Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Explicit message testing. Why failing?
  • Loading branch information
ludo committed Jul 25, 2011
1 parent ec2be73 commit d7e8561
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions spec/controllers/messages_controller_spec.rb
@@ -1,23 +1,29 @@
require 'spec_helper'

describe MessagesController do
it "should have a 'new' action" do
get :new
response.should be_success
end
describe "GET /messages/new" do
before(:each) do
@message = Message.new
end

it "should render the 'new' template" do
get :new
response.should render_template("new")
end
it "should have a 'new' action" do
get :new
response.should be_success
end

it "should initialize a new message" do
Message.should_receive(:new)
get :new
end
it "should render the 'new' template" do
get :new
response.should render_template("new")
end

it "should initialize a new message" do
Message.should_receive(:new)
get :new
end

it "should expose a new message to the view" do
get :new
assigns[:message].should_not be_nil
it "should expose a new message to the view" do
get :new
assigns[:message].should == @message
end
end
end

0 comments on commit d7e8561

Please sign in to comment.