box-o-sand/oldstuff/RubyFun/rails/gerbil/spec/views/people/index.html.erb_spec.rb

29 lines
830 B
Ruby

require 'spec_helper'
describe "people/index.html.erb" do
before(:each) do
assign(:people, [
stub_model(Person,
:name => "Name",
:age => 1,
:zipcode => "Zipcode"
),
stub_model(Person,
:name => "Name",
:age => 1,
:zipcode => "Zipcode"
)
])
end
it "renders a list of people" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => "Name".to_s, :count => 2
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => 1.to_s, :count => 2
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => "Zipcode".to_s, :count => 2
end
end