Skip to content

Instantly share code, notes, and snippets.

@jjcall
Forked from tpope/env.rb
Created September 2, 2009 21:42
Show Gist options
  • Save jjcall/179979 to your computer and use it in GitHub Desktop.
Save jjcall/179979 to your computer and use it in GitHub Desktop.
Tells webrat to use selenium on specific scenarios
# Enable Webrat's Selenium mode if one or more scenarios is tagged @selenium
Webrat.configure do |config|
config.mode = :rails
ObjectSpace.each_object(Cucumber::Ast::Features) do |features|
config.mode = :selenium if features.tag_count('selenium').nonzero?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment