Skip to content

Instantly share code, notes, and snippets.

@darkleaf
Forked from mokevnin/capybara_test.rb
Created October 18, 2012 09:10
Show Gist options
  • Save darkleaf/3910595 to your computer and use it in GitHub Desktop.
Save darkleaf/3910595 to your computer and use it in GitHub Desktop.
# gem install capybara --pre
# gem install rspec
# rspec capybara_test.rb
require 'rubygems'
require 'capybara'
require 'capybara/rspec'
Capybara.configure do |c|
c.current_driver = :selenium
end
feature 'signing up' do
scenario "Signing in with incorrect credentials" do
visit('http://signin.ebay.com')
fill_in 'User ID', :with => 'user@example.com'
fill_in 'Password', :with => 'caplin'
click_button 'Sign in'
page.should have_content('Your user ID or password is incorrect.')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment