Permalink
Browse files

And fail

  • Loading branch information...
1 parent 3fca02e commit aa974e961059651645127c33ea8f5cdd1d8bcb42 @ludo committed Jul 25, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 spec/controllers/messages_controller_spec.rb
@@ -52,6 +52,11 @@
end
describe "GET /messages" do
+ before(:each) do
+ @messages = [mock_model(Message), mock_model(Message)]
+ Message.stub!(:all).and_return(@messages)
+ end
+
it "should render 'index' template" do
get :index
response.should render_template("index")
@@ -62,6 +67,9 @@
get :index
end
- it "should expose the messages for the view"
+ it "should expose the messages for the view" do
+ get :index
+ assigns[:messages].should == @messages
+ end
end
end

0 comments on commit aa974e9

Please sign in to comment.