Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe "/employees/index.html.erb" do
include EmployeesHelper
before(:each) do
assigns[:employees] = [
stub_model(Employee,
:name => "name",
:cpf => "cpf",
:rg => "rg",
:salary => "salary",
:lunch_money => "lunch"
),
stub_model(Employee,
:name => "name",
:cpf => "cpf",
:rg => "rg",
:salary => "salary",
:lunch_money => "lunch"
)
]
end
it "renders a list of employees" do
render
response.should have_tag("tr>td", "name".to_s, 2)
response.should have_tag("tr>td", "cpf".to_s, 2)
response.should have_tag("tr>td", "rg".to_s, 2)
response.should have_tag("tr>td", "salary", 2)
response.should have_tag("tr>td", "lunch", 2)
end
end
----------------------
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby /Library/Ruby/Gems/1.8/gems/rspec-1.2.4/bin/spec --autospec spec/views/employees/index.html.erb_spec.rb -O spec/spec.opts
F
1)
'/employees/index.html.erb renders a list of employees' FAILED
2.
<false> is not true.
./spec/views/employees/index.html.erb_spec.rb:30:
Finished in 0.181842 seconds
1 example, 1 failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.