clean up the accept map after all tests
This commit is contained in:
parent
2c1465f36d
commit
ad16e2e931
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue