-
-
Save mattheworiordan/910216 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scenario "have ability to edit profile", :js => true do | |
@ability.should be_able_to(:edit, @profile) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.include Capybara | |
config.before(:each) do | |
Capybara.current_driver = :akephalos if example.metadata[:js] | |
Capybara.current_driver = example.metadata[:driver] if example.metadata[:driver] | |
end | |
config.after(:each) do | |
Capybara.use_default_driver if example.metadata[:js] | |
Capybara.use_default_driver if example.metadata[:driver] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Has better support than the original Gist for both specifying the use of JS using default Akephalos driver, or allowing the driver to be specified explicitly