Commit c3363a9a049723716bc842574099acfbdca72bf9
- Date: Wed Mar 05 22:32:06 +0000 2008
- Committer: David Chelimsky (dchelimsky@gmail.com)
- Author: David Chelimsky (dchelimsky@gmail.com)
- Commit SHA1: c3363a9a049723716bc842574099acfbdca72bf9
- Tree SHA1: 3eb163a6b00cf566d1ce6e5b1cfee6ca26e36933
Use stub (w/ :id => 1) instead of mock to eliminate warning on #id.
Commit diff
| |   |
| 65 | 65 | |
| 66 | 66 | describe "#commit" do |
| 67 | 67 | before(:each) do |
| 68 | | @commit_mock = mock("commit") |
| 68 | @commit_mock = stub("commit", :id => 1) |
| 69 | 69 | @diff_mock = mock("diff mock") |
| 70 | 70 | @commit_mock.should_receive(:diffs).and_return(@diff_mock) |
| 71 | 71 | @git.should_receive(:commit).with("a"*40).and_return(@commit_mock) |
| toggle raw diff |
--- a/spec/controllers/browse_controller_spec.rb
+++ b/spec/controllers/browse_controller_spec.rb
@@ -65,7 +65,7 @@ describe BrowseController do
describe "#commit" do
before(:each) do
- @commit_mock = mock("commit")
+ @commit_mock = stub("commit", :id => 1)
@diff_mock = mock("diff mock")
@commit_mock.should_receive(:diffs).and_return(@diff_mock)
@git.should_receive(:commit).with("a"*40).and_return(@commit_mock) |