lib/jellyfish/test.rb in jellyfish-1.1.1 vs lib/jellyfish/test.rb in jellyfish-1.2.0

- old
+ new

@@ -2,24 +2,32 @@ require 'pork/auto' require 'muack' require 'jellyfish' require 'rack' -Pork::Executor.__send__(:include, Muack::API) +Pork::Suite.include(Muack::API) copy :jellyfish do module_eval(%w[options get head post put delete patch].map{ |method| <<-RUBY def #{method} path='/', a=app, env={} File.open(File::NULL) do |input| a.call({'PATH_INFO' => path , 'REQUEST_METHOD' => '#{method}'.upcase, 'SCRIPT_NAME' => '' , 'rack.input' => input , - 'rack.url_scheme'=> 'https' , + 'rack.url_scheme'=> 'http' , 'SERVER_NAME' => 'localhost' , 'SERVER_PORT' => '8080'}.merge(env)) end end RUBY }.join("\n")) +end + +copy :stringio do + def new_stringio + sock = StringIO.new + sock.set_encoding('ASCII-8BIT') + sock + end end