Skip to content

Instantly share code, notes, and snippets.

@Fire-Dragon-DoL
Last active December 13, 2015 17:39
Show Gist options
  • Save Fire-Dragon-DoL/4949804 to your computer and use it in GitHub Desktop.
Save Fire-Dragon-DoL/4949804 to your computer and use it in GitHub Desktop.
This test doesn't pass (last one)
require 'spec_helper'
describe "Pages" do
describe "Testing locale" do
describe "GET /en" do
it "should have english text" do
visit '/en'
page.should have_content('Hello')
end
end
describe "GET /it" do
it "should have italian text" do
visit '/it'
page.should have_content('Ciao')
end
end
end
# Here Login link is never clicked
describe "GET /" do
it "should login user" do
visit '/'
click_link 'Login'
page.should have_content('Sign')
end
end
end
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Home | Austin Parker</title>
<link href="/assets/application.css" media="all" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
</head>
<body>
Ciao Mondo!<br />
<a href="/users/sign_in">Login</a>
<br />
<script src="/assets/application.js" type="text/javascript"></script>
</body>
</html>
Failures:
1) Pages GET / should login user
Screenshot: /mnt/hgfs/d_wamp_www/austin/austinparker_it/tmp/capybara/screenshot_2013-02-14-02-05-18.852.png
Failure/Error: click_link "Login"
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/requests/pages_spec.rb:23:in `block (3 levels) in <top (required)>'
---
I have this on line 23: click_link "Login"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment