Extends ActionView::TestCase::Behavior
describe "widgets/index.html.erb" do
it "renders the @widgets" do
widgets = [
stub_model(Widget, :name => "Foo"),
stub_model(Widget, :name => "Bar")
]
assign(:widgets, widgets)
render
rendered.should contain("Foo")
rendered.should contain("Bar")
end
end
Generated with the Darkfish Rdoc Generator 2.