Permalink
Browse files

fixed test helper

  • Loading branch information...
1 parent cb6fc07 commit ccebc054f5064187cda2934d56bffd116031164f @blindgaenger committed Sep 25, 2009
Showing with 6 additions and 4 deletions.
  1. +6 −4 test/helper.rb
View
@@ -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

0 comments on commit ccebc05

Please sign in to comment.