Inpsired by goodwill's capybara-select2, this gem assists in testing forms that uses the select2 select box replacement.
To be frank, the other gem was out of date, and no fork had everything we needed. They were also very ... procedural.
Add this line to your application's Gemfile, probably in the :test
group:
gem 'capybara_select2'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capybara_select2
In features/support/env.rb
require 'capybara_select2'
World(Capybara::Select2)
In spec/spec_helper.rb
require 'capybara_select2'
RSpec.configure do |c|
c.include Capybara::Select2
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request