Capybara Select2
Inpsired by goodwill's capybara-select2, this gem assists in testing forms that uses the select2 select box replacement.
(We needed the gem to work with MiniTest.)
Installation
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
Usage
Cucumber
In features/support/env.rb
require 'capybara_select2'
World(Capybara::Select2)
RSpec
In spec/spec_helper.rb
require 'capybara_select2'
RSpec.configure do |c|
c.include Capybara::Select2
end
Contributing
- 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