public
Last active

  • Download Gist
gistfile1.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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.