Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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