Skip to content

Instantly share code, notes, and snippets.

@PlugIN73
Forked from mokevnin/capybara_test.rb
Created December 18, 2012 15:58
Show Gist options
  • Select an option

  • Save PlugIN73/4329225 to your computer and use it in GitHub Desktop.

Select an option

Save PlugIN73/4329225 to your computer and use it in GitHub Desktop.
# encoding: UTF-8
# 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://vk.com/')
fill_in 'email', :with => 'test@test.com'
fill_in 'pass', :with => 'qwerty'
click_button 'quick_login_button'
page.should have_content('Не удается войти.')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment