Skip to content

Instantly share code, notes, and snippets.

@zenom
Created November 9, 2010 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zenom/669072 to your computer and use it in GitHub Desktop.
Save zenom/669072 to your computer and use it in GitHub Desktop.
spec_helper.rb
scenario "have ability to edit profile", :js => true do
@ability.should be_able_to(:edit, @profile)
end
RSpec.configure do |config|
config.include Capybara
config.before(:each) do
Capybara.current_driver = :akephalos if example.metadata[:js]
end
config.after(:each) do
Capybara.use_default_driver if example.metadata[:js]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment