trek (owner)

Revisions

gist: 132418 Download_button fork
public
Public Clone URL: git://gist.github.com/132418.git
Embed All Files: show embed
spec.rb #
1
2
3
4
5
6
7
8
9
10
11
  describe "new" do
    before(:each) do
      post = mock_model(Post)
      Post.should_receive(:new).and_return(post)
      get :new
    end
    
    it { should assign_to(:post) }
    it { should render_template(:new) }
    it { should respond_with(:success) }
  end