Created
October 17, 2012 19:05
-
-
Save mokevnin/3907451 to your computer and use it in GitHub Desktop.
capybara example (bdd)
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
# gem install capybara | |
# 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 => '[email protected]' | |
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