blob: 24f6b5c23d3a31f41ff558fb3beaeaf5ba099cc8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
require 'spec_helper'
describe Zero::Request::Server, '#port' do
subject { Zero::Request::Server.new(env) }
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
|