diff --git a/test/integration_helper.rb b/test/integration_helper.rb index 51e6fcfa..9807e87c 100644 --- a/test/integration_helper.rb +++ b/test/integration_helper.rb @@ -102,7 +102,8 @@ module IntegrationHelper file, dir = RbConfig::CONFIG.values_at('ruby_install_name', 'bindir') cmd << File.expand_path(file, dir).inspect end - cmd << "-w" << "-I" << File.expand_path('../../lib', __FILE__).inspect + cmd << "-w" unless thin? + cmd << "-I" << File.expand_path('../../lib', __FILE__).inspect cmd << app_file.inspect << '-s' << server << '-o' << '127.0.0.1' << '-p' << port cmd << "-e" << environment.to_s << '2>&1' cmd.join " " @@ -121,6 +122,10 @@ module IntegrationHelper name.to_s == "webrick" end + def thin? + name.to_s == "thin" + end + def warnings log.scan(%r[(?:\(eval|lib/sinatra).*warning:.*$]) end diff --git a/test/integration_test.rb b/test/integration_test.rb index e065f420..49fe8ac2 100644 --- a/test/integration_test.rb +++ b/test/integration_test.rb @@ -33,7 +33,7 @@ class IntegrationTest < Test::Unit::TestCase end it 'streams async' do - next unless server.name == 'thin' + next unless server.thin? Timeout.timeout(3) do chunks = [] @@ -51,7 +51,7 @@ class IntegrationTest < Test::Unit::TestCase end it 'streams async from subclass' do - next unless server.name == 'thin' + next unless server.thin? Timeout.timeout(3) do chunks = []