aboutsummaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorStormwind <stormwind@stormwinds-page.de>2013-01-04 19:42:25 +0100
committerStormwind <stormwind@stormwinds-page.de>2013-01-04 19:42:25 +0100
commit7870c5c51fdaa438c2de1f175a7506afdb3a6280 (patch)
treef7831fe12e6fb10c1004232094aa05d243d19453 /spec/unit
parentf4fa025b4d9d9efbb6443fc79948e8182c188363 (diff)
Kill mutant in Zero::Request::Server
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/request/server/port_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/unit/request/server/port_spec.rb b/spec/unit/request/server/port_spec.rb
index 25c3cb0..24f6b5c 100644
--- a/spec/unit/request/server/port_spec.rb
+++ b/spec/unit/request/server/port_spec.rb
@@ -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