How about: it 'builds a comment in the post' do post = Post.new comments_assoc = mock comment = mock_model Comment
post.stub(:comments).and_return comments_assoc comments_assoc.should_receive(:build).with(no_args).and_return comment # invoke something to trigger the action end
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users