-
-
Save cicloid/627613 to your computer and use it in GitHub Desktop.
This file contains 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
# This works with steak 0.3.x and rspec 1.x | |
# For steak --pre and rspec 2 see this fork: http://gist.github.com/448487 | |
# Put this code in acceptance_helper.rb or better in a new file spec/acceptance/support/javascript.rb | |
Spec::Runner.configure do |config| | |
config.before(:each) do | |
Capybara.current_driver = :selenium if options[:js] | |
end | |
config.after(:each) do | |
Capybara.use_default_driver if options[:js] | |
end | |
end |
This file contains 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 "Scenario that needs Javascript", :js => true do | |
#... | |
end | |
scenario "Scenario that doesn't need Javascript" do | |
#... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment