diff options
| author | mo k <mo@mokhan.ca> | 2012-06-07 22:23:58 -0600 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-06-07 22:23:58 -0600 |
| commit | dc05d508ccac71000f552435bab97bd8ba697bae (patch) | |
| tree | 456e81edc46c071713055f6f1603a6981f79b4f9 /spec/controllers/comments_controller_spec.rb | |
| parent | c4aecda657b45842fac124e1f1f31a62bf754a5d (diff) | |
create comment controller and add form to creation#show page.
Diffstat (limited to 'spec/controllers/comments_controller_spec.rb')
| -rw-r--r-- | spec/controllers/comments_controller_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb new file mode 100644 index 00000000..7851d8c9 --- /dev/null +++ b/spec/controllers/comments_controller_spec.rb @@ -0,0 +1,18 @@ +require_relative '../../app/controllers/comments_controller' +require 'fakes' +require 'fakes-rspec' + +describe CommentsController do + let(:sut) { CommentsController.new } + describe 'when commenting on a creation' do + let(:comment) { fake } + + it "should save the new comment" do + comment.should have_receieved(:save) + end + before(:each) do + Comment.stub(:build_from).and_return(comment) + sut.create + end + end +end |
