lib/jellyfish/test.rb in jellyfish-0.6.0 vs lib/jellyfish/test.rb in jellyfish-0.8.0

- old
+ new

@@ -6,11 +6,16 @@ Bacon.summary_on_exit shared :jellyfish do %w[options get head post put delete patch].each do |method| instance_eval <<-RUBY - def #{method} path='/', app=app - app.call('PATH_INFO' => path, 'REQUEST_METHOD' => '#{method}'.upcase) + def #{method} path='/', app=app, env={} + File.open(File::NULL) do |input| + app.call({'PATH_INFO' => path , + 'REQUEST_METHOD' => '#{method}'.upcase, + 'SCRIPT_NAME' => '' , + 'rack.input' => input }.merge(env)) + end end RUBY end end