Permalink
Browse files

fix the stubbed #build_gem to return a path like the real one does

  • Loading branch information...
1 parent f02fac9 commit 70a377595991f7d7ce46a87384b9e17fb887bc0d @indirect indirect committed Nov 13, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 spec/other/gem_helper_spec.rb
@@ -73,7 +73,9 @@ def mock_build_message
@helper.should_receive(:build_gem) do
# write an invalid gem file, so we can simulate install failure...
FileUtils.mkdir_p(File.join(@app.to_s, 'pkg'))
- File.open("#{@app.to_s}/pkg/test-0.0.1.gem", 'w'){|f| f << "not actually a gem"}
+ path = "#{@app.to_s}/pkg/test-0.0.1.gem"
+ File.open(path, 'w'){|f| f << "not actually a gem"}
+ path
end
proc { @helper.install_gem }.should raise_error
end

0 comments on commit 70a3775

Please sign in to comment.