0
0
Fork 0

Kill all mutants in Zero::Request::Accept

This commit is contained in:
Stormwind 2013-01-04 20:25:48 +01:00
parent 7870c5c51f
commit 5ca122b84c
3 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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