diff options
author | Stormwind <stormwind@stormwinds-page.de> | 2013-01-04 20:25:48 +0100 |
---|---|---|
committer | Stormwind <stormwind@stormwinds-page.de> | 2013-01-04 20:25:48 +0100 |
commit | 5ca122b84c080c67082eeb5d0571e0baf6a1716e (patch) | |
tree | f8282c76886226382f80a9862c292d08d468e966 /spec/unit/request/accept | |
parent | 7870c5c51fdaa438c2de1f175a7506afdb3a6280 (diff) |
Kill all mutants in Zero::Request::Accept
Diffstat (limited to 'spec/unit/request/accept')
-rw-r--r-- | spec/unit/request/accept/encoding_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/request/accept/language_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/request/accept/types_spec.rb | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/spec/unit/request/accept/encoding_spec.rb b/spec/unit/request/accept/encoding_spec.rb index 89b968b..9353cd1 100644 --- a/spec/unit/request/accept/encoding_spec.rb +++ b/spec/unit/request/accept/encoding_spec.rb @@ -5,5 +5,7 @@ describe Zero::Request::Accept, '#encoding' do let(:encoding) { 'en_US' } let(:env) { EnvGenerator.get('/foo', {'HTTP_ACCEPT_ENCODING' => encoding}) } - its(:encoding) { should be_an_instance_of(Zero::Request::AcceptType) } + it 'sets the encoding to the given value' do + subject.encoding.preferred.should eq('en_US') + end end diff --git a/spec/unit/request/accept/language_spec.rb b/spec/unit/request/accept/language_spec.rb index 1d6d983..188d8af 100644 --- a/spec/unit/request/accept/language_spec.rb +++ b/spec/unit/request/accept/language_spec.rb @@ -5,5 +5,7 @@ describe Zero::Request::Accept, '#language' do let(:language) { 'en_US' } let(:env) { EnvGenerator.get('/foo', {'HTTP_ACCEPT_LANGUAGE' => language}) } - its(:language) { should be_an_instance_of(Zero::Request::AcceptType) } + it 'sets the language to the given value' do + subject.language.preferred.should eq('en_US') + end end diff --git a/spec/unit/request/accept/types_spec.rb b/spec/unit/request/accept/types_spec.rb index b6a38f2..b5f2da7 100644 --- a/spec/unit/request/accept/types_spec.rb +++ b/spec/unit/request/accept/types_spec.rb @@ -5,5 +5,7 @@ describe Zero::Request::Accept, '#types' do let(:media_types) { 'text/html' } let(:env) { EnvGenerator.get('/foo', {'HTTP_ACCEPT' => media_types}) } - its(:types) { should be_an_instance_of(Zero::Request::AcceptType) } + it 'sets the media type to the given value' do + subject.types.preferred.should eq('text/html') + end end |