Permalink
Browse files

Fix order dependency error

  • Loading branch information...
1 parent ef404ca commit 5acbb787c22d73f8eac05c38a7f895bff1e7d415 Gabriel Evans committed Dec 28, 2012
Showing with 6 additions and 17 deletions.
  1. +3 −16 spec/eventful/request_spec.rb
  2. +2 −1 spec/eventful_spec.rb
  3. +1 −0 spec/support/vcr.rb
@@ -20,10 +20,6 @@
client
end
- after(:each) do
- WebMock.reset!
- end
-
context '#get' do
subject do
@@ -51,11 +47,8 @@
client.post(nil, 'something')
end
- before(:each) do
- WebMock.stub_request(:any, url)
- end
-
it 'executes a POST request with the given data' do
+ WebMock.stub_request(:any, url)
subject
WebMock.should have_requested(:post, url).with(body: 'something')
end
@@ -67,11 +60,8 @@
client.put(nil, 'something')
end
- before(:each) do
- WebMock.stub_request(:any, url)
- end
-
it 'executes a PUT request with the given data' do
+ WebMock.stub_request(:any, url)
subject
WebMock.should have_requested(:put, url).with(body: 'something')
end
@@ -83,11 +73,8 @@
client.delete
end
- before(:each) do
- WebMock.stub_request(:any, url)
- end
-
it 'executes a DELETE request' do
+ WebMock.stub_request(:any, url)
subject
WebMock.should have_requested(:delete, url)
end
View
@@ -7,13 +7,14 @@
context 'when a block is given' do
before do
+ @original_key = Eventful.api_key
Eventful.configure do |config|
config.api_key = 'magic'
end
end
after do
- Eventful.config.reset!
+ Eventful.config.api_key = @original_key
end
it 'sets the values on the config instance' do
View
@@ -10,6 +10,7 @@
config.filter_sensitive_data('<USER_AGENT>') do |interaction|
interaction.request.headers['User-Agent'].first
end
+
config.default_cassette_options = {
:serialize_with => :syck
}

0 comments on commit 5acbb78

Please sign in to comment.