Skip to content

Instantly share code, notes, and snippets.

@seventhsense
Created March 16, 2013 07:48
Show Gist options
  • Save seventhsense/5175432 to your computer and use it in GitHub Desktop.
Save seventhsense/5175432 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe "todos/index" do
before(:each) do
assign(:todos, [
stub_model(Todo,
:title => "Title",
:done => false
),
stub_model(Todo,
:title => "Title",
:done => false
)
])
end
it "renders a list of todos" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => "Title".to_s, :count => 2
assert_select "tr>td", :text => false.to_s, :count => 2
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment