Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed test helper

  • Loading branch information...
commit ccebc054f5064187cda2934d56bffd116031164f 1 parent cb6fc07
@blindgaenger authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 test/helper.rb
View
10 test/helper.rb
@@ -29,11 +29,13 @@ def mock_app(&block)
# sets rest in a sinatra instance
# and returns the block's result, if a block is given
def mock_rest(model, options={}, &block)
- mock_app {
+ mock_app do
rest model, options
- }
- instance = @app.new
- instance.instance_eval(&block) if block_given?
+
+ self.new.instance_eval do
+ @app.instance_eval(&block) if block_given?
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.