Rspec2: Testing the flash in your controller tests

Montag, 11. April 2011, 08:59 Uhr | roberto@vasquez-angel.de |

it "should set a flash error message" do
  get :read, :id => @unpublished_post.id
  flash[:notice].should == "This post is not yet published."
end