aboutsummaryrefslogtreecommitdiff
path: root/spec/unit/request/accept/preferred_spec.rb
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2012-11-15 17:16:55 +0100
committerGibheer <gibheer@gmail.com>2012-11-15 17:16:55 +0100
commitad16e2e9311c791f0631d035c4c47cd2483afc09 (patch)
treec3806183d895b8619a4603e6d70bf7f5ab341d8c /spec/unit/request/accept/preferred_spec.rb
parent2c1465f36db20587a13f6507a17e8b80d77d8c29 (diff)
clean up the accept map after all tests
Diffstat (limited to 'spec/unit/request/accept/preferred_spec.rb')
-rw-r--r--spec/unit/request/accept/preferred_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/unit/request/accept/preferred_spec.rb b/spec/unit/request/accept/preferred_spec.rb
index 5d11799..03a7267 100644
--- a/spec/unit/request/accept/preferred_spec.rb
+++ b/spec/unit/request/accept/preferred_spec.rb
@@ -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