0
0
Fork 0

Kill mutant in Zero::Request::Server

This commit is contained in:
Stormwind 2013-01-04 19:42:25 +01:00
parent f4fa025b4d
commit 7870c5c51f
1 changed files with 10 additions and 2 deletions

View File

@ -2,6 +2,14 @@ require 'spec_helper'
describe Zero::Request::Server, '#port' do
subject { Zero::Request::Server.new(env) }
let(:env) { EnvGenerator.get('/foo', {'SERVER_PORT' => 80}) }
its(:port) { should be(80) }
context 'sets the port to the given value' do
let(:env) { EnvGenerator.get('/foo', {'SERVER_PORT' => 80}) }
its(:port) { should be(80) }
end
context 'casts also the port to an integer, while setting it' do
let(:env) { EnvGenerator.get('/foo', {'SERVER_PORT' => '80'}) }
its(:port) { should be(80) }
end
end