Created
May 11, 2010 22:38
-
-
Save cavalle/397977 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 |
Yeah, I've seen that one, but it only talks about using example metadata to filter spec execution. I am looking at Rspec2 source code, I'll post anything I find about this issue here.
I have found the solution and forked your gist. Thanks for your input!
Please provide a link to the final solution to this issue. I also want to use "tags" with Steak and RSpec 2 :)
Papipo forked this gist and posted there his solution (see the forks section at the top right of this page):
Direct link: http://gist.github.com/448487
Thanks :)
Looks like that isn't required anymore: http://jeffkreeftmeijer.com/2011/capybara-ate-swinger/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Never tried with RSpec 2, but you may find this post useful:
http://blog.davidchelimsky.net/2010/06/14/filtering-examples-in-rspec-2/