secret
Created

  • Download Gist
Gemfile
Ruby
1 2 3 4
source "http://rubygems.org"
 
gem "capybara", "~> 2.0.0"
gem "rspec"
log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Failures:
 
1) Updating account should allow to change first name and surname
Failure/Error: visit("/")
Selenium::WebDriver::Error::UnknownError:
Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]
# ./spec/features/account/update_spec.rb:9:in `block (2 levels) in <top (required)>'
 
2) Updating account should allow to update avatar
Failure/Error: visit("/")
Selenium::WebDriver::Error::UnknownError:
Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]
# ./spec/features/account/update_spec.rb:9:in `block (2 levels) in <top (required)>'
 
Finished in 2.42 seconds
2 examples, 2 failures
 
Failed examples:
 
rspec ./spec/features/account/update_spec.rb:16 # Updating account should allow to change first name and surname
rspec ./spec/features/account/update_spec.rb:25 # Updating account should allow to update avatar
some_spec.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
require 'spec_helper'
 
feature "Updating account" do
 
before do
end
 
before do
visit("/")
click_link("Login")
fill_in("user_email", :with => "blah@wp.pl")
fill_in("user_password", :with => "itsnotreal")
click_button("Sign in")
end
 
scenario "should allow to change first name and surname" do
find("#user-nav a.account").click
fill_in("user_first_name", :with => "asd")
fill_in("user_last_name", :with => "asdf")
click_button("Update")
page.should have_content("Your account information has been updated.")
page.should have_content("asd asdf")
end
 
end
spec_helper.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12
Bundler.setup(:default, :test)
 
require 'rspec'
require 'capybara/rspec'
 
Capybara.default_driver = :selenium
Capybara.run_server = false
Capybara.app_host = "http://staging.someserver.com"
 
RSpec.configure do |config|
config.include Capybara::DSL
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.