0
0
Fork 0

clean up the accept map after all tests

This commit is contained in:
Gibheer 2012-11-15 17:16:55 +01:00
parent 2c1465f36d
commit ad16e2e931
1 changed files with 4 additions and 5 deletions

View File

@ -13,11 +13,6 @@ describe Zero::Request::Accept, '#preferred' do
let(:lower_accept) { [lower_quality, default].join(',') }
context 'without mapping' do
before :each do
# reset the mapping to nothing
Zero::Request::Accept.map = {}
end
it { subject.new(html).preferred.should == html }
it { subject.new(json).preferred.should == json }
it { subject.new(simple_accept).preferred.should == html }
@ -31,6 +26,10 @@ describe Zero::Request::Accept, '#preferred' do
Zero::Request::Accept.map = {'text/html' => 'html'}
end
after :all do
Zero::Request::Accept.map = {}
end
it { subject.new(html).preferred.should == 'html' }
end
end