Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-05-06 11:57:08 +0400
committerMarin Jankovski <marin@gitlab.com>2014-05-06 11:57:08 +0400
commit00cd3ecc44a6c6d29565c95cd5173c8e5de35537 (patch)
tree0a5a336fc55d84866e78d732fb821c74dd0fa473 /features
parentb96ad52e10151fed49f63b107ce6871c8d25647e (diff)
Use stub in testing.
Diffstat (limited to 'features')
-rw-r--r--features/steps/project/wiki.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb
index 4195ce5b28c..3244a5a05af 100644
--- a/features/steps/project/wiki.rb
+++ b/features/steps/project/wiki.rb
@@ -96,8 +96,9 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
And 'I click on existing image link' do
- Gollum::Wiki.any_instance.should_receive(:file).with("image.jpg", "master", true).and_return(Gollum::File.new(wiki.wiki))
- Gollum::File.any_instance.should_receive(:mime_type).and_return("image/jpeg")
+ file = Gollum::File.new(wiki.wiki)
+ Gollum::Wiki.any_instance.stub(:file).with("image.jpg", "master", true).and_return(file)
+ Gollum::File.any_instance.stub(:mime_type).and_return("image/jpeg")
page.should have_link('image', href: "image.jpg")
click_on "image"
end