Commit 00cd3ecc44a6c6d29565c95cd5173c8e5de35537
1 parent
b96ad52e
Exists in
spb-stable
and in
2 other branches
Use stub in testing.
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
features/steps/project/wiki.rb
... | ... | @@ -96,8 +96,9 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps |
96 | 96 | end |
97 | 97 | |
98 | 98 | And 'I click on existing image link' do |
99 | - Gollum::Wiki.any_instance.should_receive(:file).with("image.jpg", "master", true).and_return(Gollum::File.new(wiki.wiki)) | |
100 | - Gollum::File.any_instance.should_receive(:mime_type).and_return("image/jpeg") | |
99 | + file = Gollum::File.new(wiki.wiki) | |
100 | + Gollum::Wiki.any_instance.stub(:file).with("image.jpg", "master", true).and_return(file) | |
101 | + Gollum::File.any_instance.stub(:mime_type).and_return("image/jpeg") | |
101 | 102 | page.should have_link('image', href: "image.jpg") |
102 | 103 | click_on "image" |
103 | 104 | end | ... | ... |