Capybara Select2
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.
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
Usage
Cucumber
In features/support/env.rb
require 'capybara_select2'
World(::Select2)
RSpec
In spec/spec_helper.rb
require 'capybara_select2'
RSpec.configure do |c|
c.include ::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