Created
April 16, 2009 00:51
-
-
Save diegorv/96132 to your computer and use it in GitHub Desktop.
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
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