Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use "should eq(...)" instead of "should ==" to avoid ruby warning.

  • Loading branch information...
commit 8fc0f6e740a796d58c5e838e6191baf6eba6a7a9 1 parent 1dcba45
@myronmarston authored
Showing with 173 additions and 165 deletions.
  1. +8 −0 Rakefile
  2. +19 −19 spec/support/shared_example_groups/http_library.rb
  3. +6 −6 spec/support/shared_example_groups/http_stubbing_adapter.rb
  4. +13 −13 spec/support/shared_example_groups/normalizers.rb
  5. +4 −4 spec/vcr/cassette/reader_spec.rb
  6. +25 −25 spec/vcr/cassette_spec.rb
  7. +11 −11 spec/vcr/config_spec.rb
  8. +3 −3 spec/vcr/deprecations/cassette_spec.rb
  9. +2 −2 spec/vcr/deprecations/config_spec.rb
  10. +1 −1  spec/vcr/deprecations/http_stubbing_adapters/fakeweb_spec.rb
  11. +1 −1  spec/vcr/extensions/net_http_response_spec.rb
  12. +4 −4 spec/vcr/extensions/net_http_spec.rb
  13. +5 −5 spec/vcr/http_stubbing_adapters/excon_spec.rb
  14. +4 −4 spec/vcr/http_stubbing_adapters/faraday_spec.rb
  15. +3 −3 spec/vcr/http_stubbing_adapters/multi_object_proxy_spec.rb
  16. +5 −5 spec/vcr/middleware/cassette_arguments_spec.rb
  17. +3 −3 spec/vcr/middleware/faraday_spec.rb
  18. +4 −4 spec/vcr/middleware/rack_spec.rb
  19. +11 −11 spec/vcr/request_matcher_spec.rb
  20. +6 −6 spec/vcr/structs/http_interaction_spec.rb
  21. +7 −7 spec/vcr/structs/request_spec.rb
  22. +5 −5 spec/vcr/structs/response_spec.rb
  23. +2 −2 spec/vcr/structs/response_status_spec.rb
  24. +2 −2 spec/vcr/test_frameworks/cucumber_spec.rb
  25. +3 −3 spec/vcr/test_frameworks/rspec_spec.rb
  26. +6 −6 spec/vcr/util/hooks_spec.rb
  27. +10 −10 spec/vcr_spec.rb
View
8 Rakefile
@@ -94,3 +94,11 @@ task :release => [:require_ruby_18, :prep_relish_release, :relish]
# For gem-test: http://gem-testers.org/
task :test => :spec
+
+task :fix_should_eq do
+ Dir["spec/**/*.rb"].each do |spec_file|
+ contents = File.read(spec_file)
+ contents.gsub!(/should == (.*)$/, 'should eq(\1)')
+ File.open(spec_file, 'w') { |f| f.write(contents) }
+ end
+end
View
38 spec/support/shared_example_groups/http_library.rb
@@ -49,7 +49,7 @@
if recorded_val.is_a?(Array) && replayed_val.is_a?(Array)
replayed_val.should =~ recorded_val
else
- replayed_val.should == recorded_val
+ replayed_val.should eq(recorded_val)
end
end
end
@@ -72,7 +72,7 @@
let(:response) { VCR::Response.new(status, nil, response_body, '1.1') }
it 'returns the response for a matching request' do
- get_body_string(make_http_request(:get, 'http://example.com/')).should == response_body
+ get_body_string(make_http_request(:get, 'http://example.com/')).should eq(response_body)
end
end
@@ -82,7 +82,7 @@ def self.test_url(description, url)
let(:response) { VCR::Response.new(status, nil, response_body, '1.1') }
it 'returns the expected response for the same request' do
- get_body_string(make_http_request(:get, url)).should == response_body
+ get_body_string(make_http_request(:get, url)).should eq(response_body)
end
end
end
@@ -116,7 +116,7 @@ def self.matching_on(attribute, valid, invalid, &block)
valid.each do |val, response|
it "returns the expected response for a #{val.inspect} request" do
- get_body_string(make_http_request(val)).should == response
+ get_body_string(make_http_request(val)).should eq(response)
end
end
@@ -174,7 +174,7 @@ def self.test_real_http_request(http_allowed, *other)
if http_allowed
it 'allows real http requests' do
- get_body_string(make_http_request(:get, url)).should == 'FOO!'
+ get_body_string(make_http_request(:get, url)).should eq('FOO!')
end
describe 'recording new http requests' do
@@ -192,11 +192,11 @@ def self.test_real_http_request(http_allowed, *other)
end
it 'records the request uri' do
- recorded_interaction.request.uri.should == url
+ recorded_interaction.request.uri.should eq(url)
end
it 'records the request method' do
- recorded_interaction.request.method.should == :get
+ recorded_interaction.request.method.should eq(:get)
end
it 'records the request body' do
@@ -208,19 +208,19 @@ def self.test_real_http_request(http_allowed, *other)
end
it 'records the response status code' do
- recorded_interaction.response.status.code.should == 200
+ recorded_interaction.response.status.code.should eq(200)
end
it 'records the response status message' do
- recorded_interaction.response.status.message.should == 'OK'
+ recorded_interaction.response.status.message.should eq('OK')
end unless other.include?(:status_message_not_exposed)
it 'records the response body' do
- recorded_interaction.response.body.should == 'FOO!'
+ recorded_interaction.response.body.should eq('FOO!')
end
it 'records the response headers' do
- recorded_interaction.response.headers['content-type'].should == ["text/html;charset=utf-8"]
+ recorded_interaction.response.headers['content-type'].should eq(["text/html;charset=utf-8"])
end
end
else
@@ -234,12 +234,12 @@ def self.test_real_http_request(http_allowed, *other)
end
def test_request_stubbed(method, url, expected)
- subject.request_stubbed?(VCR::Request.new(method, url), [:method, :uri]).should == expected
+ subject.request_stubbed?(VCR::Request.new(method, url), [:method, :uri]).should eq(expected)
end
it "returns false from #http_connections_allowed? when http_connections_allowed is set to nil" do
subject.http_connections_allowed = nil
- subject.http_connections_allowed?.should == false
+ subject.http_connections_allowed?.should eq(false)
end
describe '.restore_stubs_checkpoint' do
@@ -255,7 +255,7 @@ def test_request_stubbed(method, url, expected)
before(:each) { subject.http_connections_allowed = http_allowed }
it "returns #{http_allowed} for #http_connections_allowed?" do
- subject.http_connections_allowed?.should == http_allowed
+ subject.http_connections_allowed?.should eq(http_allowed)
end
test_real_http_request(http_allowed, *other)
@@ -273,7 +273,7 @@ def test_request_stubbed(method, url, expected)
%w[ 127.0.0.1 localhost ].each do |localhost_alias|
it "allows requests to #{localhost_alias}" do
- get_body_string(make_http_request(:get, "http://#{localhost_alias}:#{VCR::SinatraApp.port}/localhost_test")).should == localhost_response
+ get_body_string(make_http_request(:get, "http://#{localhost_alias}:#{VCR::SinatraApp.port}/localhost_test")).should eq(localhost_response)
end
end
@@ -309,12 +309,12 @@ def test_request_stubbed(method, url, expected)
end
it 'rotates through multiple responses for the same request' do
- get_body_string(make_http_request(:get, 'http://example.com/foo')).should == 'example.com get response 1 with path=foo'
- get_body_string(make_http_request(:get, 'http://example.com/foo')).should == 'example.com get response 2 with path=foo'
+ get_body_string(make_http_request(:get, 'http://example.com/foo')).should eq('example.com get response 1 with path=foo')
+ get_body_string(make_http_request(:get, 'http://example.com/foo')).should eq('example.com get response 2 with path=foo')
# subsequent requests keep getting the last one
- get_body_string(make_http_request(:get, 'http://example.com/foo')).should == 'example.com get response 2 with path=foo'
- get_body_string(make_http_request(:get, 'http://example.com/foo')).should == 'example.com get response 2 with path=foo'
+ get_body_string(make_http_request(:get, 'http://example.com/foo')).should eq('example.com get response 2 with path=foo')
+ get_body_string(make_http_request(:get, 'http://example.com/foo')).should eq('example.com get response 2 with path=foo')
end unless other.include?(:does_not_support_rotating_responses)
it "correctly handles stubbing multiple values for the same header" do
View
12 spec/support/shared_example_groups/http_stubbing_adapter.rb
@@ -27,11 +27,11 @@ def adapter_enabled?(adapter)
VCR::HttpStubbingAdapters::Common.adapters.each do |adapter|
if adapter == described_class
it "yields with #{adapter} enabled" do
- adapter_enabled?(adapter).should == true
+ adapter_enabled?(adapter).should eq(true)
end
else
it "yields without #{adapter} enabled" do
- adapter_enabled?(adapter).should == false
+ adapter_enabled?(adapter).should eq(false)
end
end
end
@@ -48,14 +48,14 @@ def adapter_enabled?(adapter)
it 'returns the uri for the given http request' do
net_http = Net::HTTP.new('example.com', 80)
request = Net::HTTP::Get.new('/foo/bar')
- subject.request_uri(net_http, request).should == 'http://example.com:80/foo/bar'
+ subject.request_uri(net_http, request).should eq('http://example.com:80/foo/bar')
end
it 'handles basic auth' do
net_http = Net::HTTP.new('example.com',80)
request = Net::HTTP::Get.new('/auth.txt')
request.basic_auth 'user', 'pass'
- subject.request_uri(net_http, request).should == 'http://user:pass@example.com:80/auth.txt'
+ subject.request_uri(net_http, request).should eq('http://user:pass@example.com:80/auth.txt')
end
end
@@ -73,12 +73,12 @@ def self.matching_on(attribute, valid1, valid2, invalid, &block)
[valid1, valid2].each do |val|
it "returns true for a #{val.inspect} request" do
- subject.request_stubbed?(request(val), [attribute]).should == true
+ subject.request_stubbed?(request(val), [attribute]).should eq(true)
end
end
it "returns false for another #{attribute}" do
- subject.request_stubbed?(request(invalid), [attribute]).should == false
+ subject.request_stubbed?(request(invalid), [attribute]).should eq(false)
end
else
it 'raises an error indicating matching requests on this attribute is not supported' do
View
26 spec/support/shared_example_groups/normalizers.rb
@@ -6,8 +6,8 @@
end
it 'normalizes the hash to lower case keys and arrays of values' do
- instance.headers['some_header'].should == ['value1']
- instance.headers['another'].should == ['a', 'b']
+ instance.headers['some_header'].should eq(['value1'])
+ instance.headers['another'].should eq(['a', 'b'])
end
it 'removes empty headers' do
@@ -17,7 +17,7 @@
it 'filters out unimportant default values set by the HTTP library' do
instance = with_headers('accept' => ['*/*'], 'connection' => 'close', 'http-user' => ['foo'], 'expect' => ['', 'bar'])
- instance.headers.should == { 'http-user' => ['foo'], 'expect' => ['bar'] }
+ instance.headers.should eq({ 'http-user' => ['foo'], 'expect' => ['bar'] })
end
it 'sets empty hash header to nil' do
@@ -28,26 +28,26 @@
key = 'my-key'
key.instance_variable_set(:@foo, 7)
instance = with_headers(key => ['value1'])
- VCR::YAML.dump(instance.headers).should == VCR::YAML.dump('my-key' => ['value1'])
+ VCR::YAML.dump(instance.headers).should eq(VCR::YAML.dump('my-key' => ['value1']))
end
it 'ensures header values are serialized to yaml as raw strings' do
value = 'my-value'
value.instance_variable_set(:@foo, 7)
instance = with_headers('my-key' => [value])
- VCR::YAML.dump(instance.headers).should == VCR::YAML.dump('my-key' => ['my-value'])
+ VCR::YAML.dump(instance.headers).should eq(VCR::YAML.dump('my-key' => ['my-value']))
end
it 'handles nested arrays' do
accept_encoding = [["gzip", "1.0"], ["deflate", "1.0"], ["sdch", "1.0"]]
instance = with_headers('accept-encoding' => accept_encoding)
- instance.headers['accept-encoding'].should == accept_encoding
+ instance.headers['accept-encoding'].should eq(accept_encoding)
end
it 'handles nested arrays with floats' do
accept_encoding = [["gzip", 1.0], ["deflate", 1.0], ["sdch", 1.0]]
instance = with_headers('accept-encoding' => accept_encoding)
- instance.headers['accept-encoding'].should == accept_encoding
+ instance.headers['accept-encoding'].should eq(accept_encoding)
end
end
@@ -59,31 +59,31 @@
it "ensures the body is serialized to yaml as a raw string" do
body = "My String"
body.instance_variable_set(:@foo, 7)
- VCR::YAML.dump(instance(body).body).should == VCR::YAML.dump("My String")
+ VCR::YAML.dump(instance(body).body).should eq(VCR::YAML.dump("My String"))
end
end
shared_examples_for 'uri normalization' do
it 'adds port 80 to an http URI that lacks a port' do
- instance('http://example.com/foo').uri.should == 'http://example.com:80/foo'
+ instance('http://example.com/foo').uri.should eq('http://example.com:80/foo')
end
it 'keeps the existing port for an http URI' do
- instance('http://example.com:8000/foo').uri.should == 'http://example.com:8000/foo'
+ instance('http://example.com:8000/foo').uri.should eq('http://example.com:8000/foo')
end
it 'adds port 443 to an https URI that lacks a port' do
- instance('https://example.com/foo').uri.should == 'https://example.com:443/foo'
+ instance('https://example.com/foo').uri.should eq('https://example.com:443/foo')
end
it 'keeps the existing port for an https URI' do
- instance('https://example.com:8000/foo').uri.should == 'https://example.com:8000/foo'
+ instance('https://example.com:8000/foo').uri.should eq('https://example.com:8000/foo')
end
end
shared_examples_for 'status message normalization' do
it 'chomps leading and trailing spaces on the status message' do
- instance(' OK ').message.should == 'OK'
+ instance(' OK ').message.should eq('OK')
end
it 'sets status message to nil when it is the empty string' do
View
8 spec/vcr/cassette/reader_spec.rb
@@ -21,14 +21,14 @@ def read(*args)
context 'when ERB is disabled' do
it 'reads the raw file content' do
- read('no_vars', false).should == no_vars_content
- read('no_vars', nil).should == no_vars_content
+ read('no_vars', false).should eq(no_vars_content)
+ read('no_vars', nil).should eq(no_vars_content)
end
end
context 'when ERB is enabled but no variables are passed' do
it 'renders the file content as ERB' do
- read('no_vars', true).should == "7. Some ERB"
+ read('no_vars', true).should eq("7. Some ERB")
end
it 'raises an appropriate error when the ERB template needs variables' do
@@ -43,7 +43,7 @@ def read(*args)
context 'when ERB is enabled and variables are passed' do
it 'renders the file content as ERB with the passed variables' do
- read('vars', :var1 => 'foo', :var2 => 'bar').should == 'foo. ERB with Vars! bar'
+ read('vars', :var1 => 'foo', :var2 => 'bar').should eq('foo. ERB with Vars! bar')
end
it 'raises an appropriate error when one or more of the needed variables are not passed' do
View
50 spec/vcr/cassette_spec.rb
@@ -4,7 +4,7 @@
describe '#file' do
it 'combines the cassette_library_dir with the cassette name' do
cassette = VCR::Cassette.new('the_file')
- cassette.file.should == File.join(VCR::Config.cassette_library_dir, 'the_file.yml')
+ cassette.file.should eq(File.join(VCR::Config.cassette_library_dir, 'the_file.yml'))
end
it 'strips out disallowed characters so that it is a valid file name with no spaces' do
@@ -27,9 +27,9 @@
describe '#record_http_interaction' do
it 'adds the interaction to #new_recorded_interactions' do
cassette = VCR::Cassette.new(:test_cassette)
- cassette.new_recorded_interactions.should == []
+ cassette.new_recorded_interactions.should eq([])
cassette.record_http_interaction(:the_interaction)
- cassette.new_recorded_interactions.should == [:the_interaction]
+ cassette.new_recorded_interactions.should eq([:the_interaction])
end
end
@@ -38,12 +38,12 @@
it "returns the provided options" do
c = VCR::Cassette.new('example', :match_requests_on => [:uri])
- c.match_requests_on.should == [:uri]
+ c.match_requests_on.should eq([:uri])
end
it "returns a the default #match_requests_on when it has not been specified for the cassette" do
c = VCR::Cassette.new('example')
- c.match_requests_on.should == [:uri, :method]
+ c.match_requests_on.should eq([:uri, :method])
end
end
@@ -65,7 +65,7 @@
it 'does not raise an error in the case of an empty file' do
VCR::Config.cassette_library_dir = "#{VCR::SPEC_ROOT}/fixtures/#{YAML_SERIALIZATION_VERSION}/cassette_spec"
- VCR::Cassette.new('empty', :record => :none).recorded_interactions.should == []
+ VCR::Cassette.new('empty', :record => :none).recorded_interactions.should eq([])
end
it 'creates a stubs checkpoint on the http_stubbing_adapter' do
@@ -124,7 +124,7 @@
it "defaults the record mode to #{record_mode} when VCR::Config.default_cassette_options[:record] is #{record_mode}" do
cassette = VCR::Cassette.new(:test)
- cassette.record_mode.should == record_mode
+ cassette.record_mode.should eq(record_mode)
end
end
@@ -186,7 +186,7 @@
before(:each) { File.stub(:exist?).with(file_name).and_return(false) }
it "has :#{record_mode} for the record mode" do
- subject.record_mode.should == record_mode
+ subject.record_mode.should eq(record_mode)
end
end
@@ -200,7 +200,7 @@
before(:each) { File.stub(:stat).with(file_name).and_return(stub(:mtime => Time.now - 7.days + 60)) }
it "has :#{record_mode} for the record mode" do
- subject.record_mode.should == record_mode
+ subject.record_mode.should eq(record_mode)
end
end
@@ -209,12 +209,12 @@
it "has :all for the record mode when there is an internet connection available" do
VCR::InternetConnection.stub(:available? => true)
- subject.record_mode.should == :all
+ subject.record_mode.should eq(:all)
end
it "has :#{record_mode} for the record mode when there is no internet connection available" do
VCR::InternetConnection.stub(:available? => false)
- subject.record_mode.should == record_mode
+ subject.record_mode.should eq(record_mode)
end
end
end
@@ -233,7 +233,7 @@
VCR::Config.cassette_library_dir = "#{VCR::SPEC_ROOT}/fixtures/#{YAML_SERIALIZATION_VERSION}/cassette_spec"
cassette = VCR::Cassette.new('with_localhost_requests', :record => record_mode)
- cassette.recorded_interactions.map { |i| URI.parse(i.uri).host }.should == %w[example.com]
+ cassette.recorded_interactions.map { |i| URI.parse(i.uri).host }.should eq(%w[example.com])
end
it "loads the recorded interactions from the library yml file" do
@@ -244,16 +244,16 @@
i1, i2, i3 = *cassette.recorded_interactions
- i1.request.method.should == :get
- i1.request.uri.should == 'http://example.com:80/'
+ i1.request.method.should eq(:get)
+ i1.request.uri.should eq('http://example.com:80/')
i1.response.body.should =~ /You have reached this web page by typing.+example\.com/
- i2.request.method.should == :get
- i2.request.uri.should == 'http://example.com:80/foo'
+ i2.request.method.should eq(:get)
+ i2.request.uri.should eq('http://example.com:80/foo')
i2.response.body.should =~ /foo was not found on this server/
- i3.request.method.should == :get
- i3.request.uri.should == 'http://example.com:80/'
+ i3.request.method.should eq(:get)
+ i3.request.uri.should eq('http://example.com:80/')
i3.response.body.should =~ /Another example\.com response/
end
@@ -324,7 +324,7 @@
expect { cassette.eject }.to change { File.exist?(cassette.file) }.from(false).to(true)
saved_recorded_interactions = VCR::YAML.load_file(cassette.file)
- saved_recorded_interactions.should == recorded_interactions
+ saved_recorded_interactions.should eq(recorded_interactions)
end
it 'invokes the appropriately tagged before_record hooks' do
@@ -359,7 +359,7 @@
cassette.eject
saved_recorded_interactions = VCR::YAML.load_file(cassette.file)
- saved_recorded_interactions.should == [interaction_2]
+ saved_recorded_interactions.should eq([interaction_2])
end
it 'does not write the cassette to disk if all interactions have been ignored' do
@@ -380,7 +380,7 @@
expect { cassette.eject }.to change { File.exist?(cassette.file) }.from(false).to(true)
saved_recorded_interactions = VCR::YAML.load_file(cassette.file)
- saved_recorded_interactions.should == recorded_interactions
+ saved_recorded_interactions.should eq(recorded_interactions)
end
[:all, :none, :new_episodes].each do |record_mode|
@@ -440,12 +440,12 @@ class << interaction.request; self; end.class_eval do
it 'removes the old interactions that match new requests, and saves the new interactions follow the old ones' do
subject.eject
- saved_recorded_interactions.should == [
+ saved_recorded_interactions.should eq([
old_interaction_2,
new_interaction_1,
new_interaction_2,
new_interaction_3
- ]
+ ])
end
it "matches old requests to new ones using the cassette's match attributes" do
@@ -464,14 +464,14 @@ class << interaction.request; self; end.class_eval do
it 'saves the old interactions followed by the new ones to disk' do
subject.eject
- saved_recorded_interactions.should == [
+ saved_recorded_interactions.should eq([
old_interaction_1,
old_interaction_2,
old_interaction_3,
new_interaction_1,
new_interaction_2,
new_interaction_3
- ]
+ ])
end
end
end
View
22 spec/vcr/config_spec.rb
@@ -22,10 +22,10 @@ def stub_no_http_stubbing_adapter
describe '.default_cassette_options' do
it 'has a hash with some defaults even if it is set to nil' do
VCR::Config.default_cassette_options = nil
- VCR::Config.default_cassette_options.should == {
+ VCR::Config.default_cassette_options.should eq({
:match_requests_on => VCR::RequestMatcher::DEFAULT_MATCH_ATTRIBUTES,
:record => :once
- }
+ })
end
it "returns #{VCR::RequestMatcher::DEFAULT_MATCH_ATTRIBUTES.inspect} for :match_requests_on when other defaults have been set" do
@@ -42,14 +42,14 @@ def stub_no_http_stubbing_adapter
describe '.stub_with' do
it 'stores the given symbols in http_stubbing_libraries' do
VCR::Config.stub_with :fakeweb, :typhoeus
- VCR::Config.http_stubbing_libraries.should == [:fakeweb, :typhoeus]
+ VCR::Config.http_stubbing_libraries.should eq([:fakeweb, :typhoeus])
end
end
describe '.http_stubbing_libraries' do
it 'returns an empty array even when the variable is nil' do
VCR::Config.send(:remove_instance_variable, :@http_stubbing_libraries)
- VCR::Config.http_stubbing_libraries.should == []
+ VCR::Config.http_stubbing_libraries.should eq([])
end
end
@@ -63,20 +63,20 @@ def stub_no_http_stubbing_adapter
it 'adds the given hosts to the ignored_hosts list' do
VCR::Config.ignore_hosts 'example.com', 'example.net'
- VCR::Config.ignored_hosts.should == %w[ example.com example.net ]
+ VCR::Config.ignored_hosts.should eq(%w[ example.com example.net ])
VCR::Config.ignore_host 'example.org'
- VCR::Config.ignored_hosts.should == %w[ example.com example.net example.org ]
+ VCR::Config.ignored_hosts.should eq(%w[ example.com example.net example.org ])
end
it 'removes duplicate hosts' do
VCR::Config.ignore_host 'example.com'
VCR::Config.ignore_host 'example.com'
- VCR::Config.ignored_hosts.should == ['example.com']
+ VCR::Config.ignored_hosts.should eq(['example.com'])
end
it "updates the http_stubbing_adapter's ignored_hosts list" do
VCR::Config.ignore_hosts 'example.com', 'example.org'
- stubbing_adapter.send(:ignored_hosts).should == %w[ example.com example.org ]
+ stubbing_adapter.send(:ignored_hosts).should eq(%w[ example.com example.org ])
end
end
@@ -88,13 +88,13 @@ def stub_no_http_stubbing_adapter
it 'adds the localhost aliases to the ignored_hosts list when set to true' do
VCR::Config.ignore_host 'example.com'
VCR::Config.ignore_localhost = true
- VCR::Config.ignored_hosts.should == ['example.com', *VCR::LOCALHOST_ALIASES]
+ VCR::Config.ignored_hosts.should eq(['example.com', *VCR::LOCALHOST_ALIASES])
end
it 'removes the localhost aliases from the ignored_hosts list when set to false' do
VCR::Config.ignore_host 'example.com', *VCR::LOCALHOST_ALIASES
VCR::Config.ignore_localhost = false
- VCR::Config.ignored_hosts.should == ['example.com']
+ VCR::Config.ignored_hosts.should eq(['example.com'])
end
end
@@ -102,7 +102,7 @@ def stub_no_http_stubbing_adapter
[true, false].each do |val|
it "sets the allow_http_connections_when_no_cassette to #{val} when set to #{val}" do
VCR::Config.allow_http_connections_when_no_cassette = val
- VCR::Config.allow_http_connections_when_no_cassette?.should == val
+ VCR::Config.allow_http_connections_when_no_cassette?.should eq(val)
end
end
View
6 spec/vcr/deprecations/cassette_spec.rb
@@ -30,7 +30,7 @@
it "sets the ignored_hosts list to the list of localhost aliases" do
subject
- VCR::Config.ignored_hosts.should == VCR::LOCALHOST_ALIASES
+ VCR::Config.ignored_hosts.should eq(VCR::LOCALHOST_ALIASES)
end
it "prints a warning: VCR's :allow_real_http cassette option is deprecated. Instead, use the ignore_localhost configuration option." do
@@ -40,7 +40,7 @@
it "reverts ignore_hosts when the cassette is ejected" do
subject.eject
- VCR::Config.ignored_hosts.should == orig_ignored_hosts
+ VCR::Config.ignored_hosts.should eq(orig_ignored_hosts)
end
{
@@ -49,7 +49,7 @@
'http://example.com' => false
}.each do |url, expected_value|
it "returns #{expected_value} for #allow_real_http_requests_to? when it is given #{url}" do
- subject.allow_real_http_requests_to?(URI.parse(url)).should == expected_value
+ subject.allow_real_http_requests_to?(URI.parse(url)).should eq(expected_value)
end
end
end
View
4 spec/vcr/deprecations/config_spec.rb
@@ -5,7 +5,7 @@
before(:each) { described_class.stub_with :webmock, :typhoeus }
it 'returns the first configured stubbing library' do
- described_class.http_stubbing_library.should == :webmock
+ described_class.http_stubbing_library.should eq(:webmock)
end
it 'prints a warning: WARNING: VCR::Config.http_stubbing_library is deprecated. Use VCR::Config.http_stubbing_libraries instead' do
@@ -17,7 +17,7 @@
describe '.http_stubbing_library=' do
it 'sets http_stubbing_libraries to an array of the given value' do
described_class.http_stubbing_library = :webmock
- described_class.http_stubbing_libraries.should == [:webmock]
+ described_class.http_stubbing_libraries.should eq([:webmock])
end
it 'prints a warning: WARNING: VCR::Config.http_stubbing_library= is deprecated. Use VCR::Config.stub_with instead' do
View
2  spec/vcr/deprecations/http_stubbing_adapters/fakeweb_spec.rb
@@ -5,7 +5,7 @@
subject { described_class::LOCALHOST_REGEX }
it 'refers to the expected regex' do
- should == %r|\Ahttps?://((\w+:)?\w+@)?(#{VCR::LOCALHOST_ALIASES.sort.map { |a| Regexp.escape(a) }.join('|')})(:\d+)?/|i
+ should eq(%r|\Ahttps?://((\w+:)?\w+@)?(#{VCR::LOCALHOST_ALIASES.sort.map { |a| Regexp.escape(a) }.join('|')})(:\d+)?/|i)
end
it 'prints a warning: WARNING: `VCR::HttpStubbingAdapters::FakeWeb::LOCALHOST_REGEX` is deprecated.' do
View
2  spec/vcr/extensions/net_http_response_spec.rb
@@ -20,7 +20,7 @@ def self.it_allows_the_body_to_be_read(expected_regex)
dest = ''
ret_val = response { |r| r.read_body(dest) }.body
dest.to_s.should =~ expected_regex
- ret_val.to_s.should == dest
+ ret_val.to_s.should eq(dest)
end
it 'raises an ArgumentError if both a destination string and a block is given to #read_body' do
View
8 spec/vcr/extensions/net_http_spec.rb
@@ -8,8 +8,8 @@
it 'checks if the request is stubbed using a VCR::Request' do
VCR.http_stubbing_adapter.should_receive(:request_stubbed?) do |request, _|
- request.uri.should == "http://localhost:#{VCR::SinatraApp.port}/"
- request.method.should == :get
+ request.uri.should eq("http://localhost:#{VCR::SinatraApp.port}/")
+ request.method.should eq(:get)
true
end
Net::HTTP.get(uri)
@@ -48,8 +48,8 @@ def perform_get_with_returning_block
it "records headers for which Net::HTTP usually sets defaults when the user manually sets their values" do
VCR.should_receive(:record_http_interaction) do |interaction|
- interaction.request.headers['content-type'].should == ['foo/bar']
- interaction.request.headers['host'].should == ['my-example.com']
+ interaction.request.headers['content-type'].should eq(['foo/bar'])
+ interaction.request.headers['host'].should eq(['my-example.com'])
end
Net::HTTP.new('localhost', VCR::SinatraApp.port).send_request('POST', '/', '', { 'Content-Type' => 'foo/bar', 'Host' => 'my-example.com' })
end
View
10 spec/vcr/http_stubbing_adapters/excon_spec.rb
@@ -31,8 +31,8 @@
end
end
- recorded.should == played_back
- recorded.should == 'query: Tolkien'
+ recorded.should eq(played_back)
+ recorded.should eq('query: Tolkien')
end
end
@@ -51,8 +51,8 @@
chunks.join
end
- recorded.should == played_back
- recorded.should == "FOO!"
+ recorded.should eq(played_back)
+ recorded.should eq("FOO!")
end
end
@@ -61,7 +61,7 @@
described_class.http_connections_allowed = true
VCR.should_receive(:record_http_interaction) do |interaction|
- interaction.response.status.code.should == 404
+ interaction.response.status.code.should eq(404)
end
expect {
View
8 spec/vcr/http_stubbing_adapters/faraday_spec.rb
@@ -40,10 +40,10 @@ def stubbed_response_for(request)
end
def test_stubbed_responses
- stubbed_response_for(request_1).should == :response_1
- stubbed_response_for(request_1).should == :response_2
- stubbed_response_for(request_1).should == :response_2
- stubbed_response_for(request_1).should == :response_2
+ stubbed_response_for(request_1).should eq(:response_1)
+ stubbed_response_for(request_1).should eq(:response_2)
+ stubbed_response_for(request_1).should eq(:response_2)
+ stubbed_response_for(request_1).should eq(:response_2)
end
describe '.stubbed_response_for' do
View
6 spec/vcr/http_stubbing_adapters/multi_object_proxy_spec.rb
@@ -22,7 +22,7 @@ module HttpStubbingAdapters
describe '#proxied_objects' do
it 'returns the proxied objects' do
- subject.proxied_objects.should == [mock1, mock2]
+ subject.proxied_objects.should eq([mock1, mock2])
end
end
@@ -51,7 +51,7 @@ module HttpStubbingAdapters
mock1.should_not respond_to(:request_stubbed?)
mock2.should_receive(:request_stubbed?).and_return(true)
- subject.request_stubbed?.should == true
+ subject.request_stubbed?.should eq(true)
end
it 'proxies messages to each object' do
@@ -74,7 +74,7 @@ module HttpStubbingAdapters
mock1.should_receive(method).and_return(:return_value_1)
mock2.should_receive(method).and_return(:return_value_1)
- subject.__send__(method).should == :return_value_1
+ subject.__send__(method).should eq(:return_value_1)
end
end
end
View
10 spec/vcr/middleware/cassette_arguments_spec.rb
@@ -8,24 +8,24 @@
it 'stores the given value, returning it when no arg is given' do
subject.name :value1
- subject.name.should == :value1
+ subject.name.should eq(:value1)
subject.name :value2
- subject.name.should == :value2
+ subject.name.should eq(:value2)
end
end
describe '#options' do
it 'initially returns an empty hash' do
- subject.options.should == {}
+ subject.options.should eq({})
end
it 'merges the given hash options, returning them when no arg is given' do
subject.options :record => :new_episodes
- subject.options.should == { :record => :new_episodes }
+ subject.options.should eq({ :record => :new_episodes })
subject.options :erb => true
- subject.options.should == { :record => :new_episodes, :erb => true }
+ subject.options.should eq({ :record => :new_episodes, :erb => true })
end
end
end
View
6 spec/vcr/middleware/faraday_spec.rb
@@ -25,13 +25,13 @@
end
it 'sets the cassette name based on the provided block' do
- app = lambda { |env| VCR.current_cassette.name.should == 'rack_cassette' }
+ app = lambda { |env| VCR.current_cassette.name.should eq('rack_cassette') }
instance = described_class.new(app) { |c| c.name 'rack_cassette' }
instance.call(env_hash)
end
it 'sets the cassette options based on the provided block' do
- app = lambda { |env| VCR.current_cassette.erb.should == { :foo => :bar } }
+ app = lambda { |env| VCR.current_cassette.erb.should eq({ :foo => :bar }) }
instance = described_class.new(app, &lambda do |c|
c.name 'c'
c.options :erb => { :foo => :bar }
@@ -42,7 +42,7 @@
it 'yields the env to the provided block when the block accepts 2 arguments' do
instance = described_class.new(lambda { |env| }, &lambda do |c, env|
- env.should == env_hash
+ env.should eq(env_hash)
c.name 'c'
end)
View
8 spec/vcr/middleware/rack_spec.rb
@@ -15,7 +15,7 @@
rack_app = mock
rack_app.should_receive(:call).with(env_hash).and_return(:response)
instance = described_class.new(rack_app) { |c| c.name 'cassette_name' }
- instance.call(env_hash).should == :response
+ instance.call(env_hash).should eq(:response)
end
it 'uses a cassette when the rack app is called' do
@@ -27,13 +27,13 @@
end
it 'sets the cassette name based on the provided block' do
- rack_app = lambda { |env| VCR.current_cassette.name.should == 'rack_cassette' }
+ rack_app = lambda { |env| VCR.current_cassette.name.should eq('rack_cassette') }
instance = described_class.new(rack_app) { |c| c.name 'rack_cassette' }
instance.call({})
end
it 'sets the cassette options based on the provided block' do
- rack_app = lambda { |env| VCR.current_cassette.erb.should == { :foo => :bar } }
+ rack_app = lambda { |env| VCR.current_cassette.erb.should eq({ :foo => :bar }) }
instance = described_class.new(rack_app, &lambda do |c|
c.name 'c'
c.options :erb => { :foo => :bar }
@@ -44,7 +44,7 @@
it 'yields the rack env to the provided block when the block accepts 2 arguments' do
instance = described_class.new(lambda { |env| }, &lambda do |c, env|
- env.should == env_hash
+ env.should eq(env_hash)
c.name 'c'
end)
View
22 spec/vcr/request_matcher_spec.rb
@@ -18,11 +18,11 @@ def self.for_matcher(*attributes, &block)
let(:uri) { 'http://foo.example.com/path/to/something?param=value' }
for_matcher do
- it("returns a regex that matches any URI") { should == /.*/ }
+ it("returns a regex that matches any URI") { should eq(/.*/) }
end
for_matcher :uri do
- it("returns the exact uri") { should == uri }
+ it("returns the exact uri") { should eq(uri) }
end
for_matcher :host do
@@ -83,7 +83,7 @@ def self.for_matcher(*attributes, &block)
it "returns the request's URI when it is a regex, regardless of the match attributes" do
[:uri, :host, :path].each do |attribute|
matcher = VCR::RequestMatcher.new(stub(:uri => /some regex/), [attribute])
- matcher.uri.should == /some regex/
+ matcher.uri.should eq(/some regex/)
end
end
end
@@ -91,7 +91,7 @@ def self.for_matcher(*attributes, &block)
describe '#method' do
it 'returns the request method when the match attributes include :method' do
matcher = VCR::RequestMatcher.new(stub(:method => :get), [:method])
- matcher.method.should == :get
+ matcher.method.should eq(:get)
end
it 'returns nil when the match attributes do not include :method' do
@@ -103,7 +103,7 @@ def self.for_matcher(*attributes, &block)
describe '#body' do
it 'returns the request body when the match attributes include :body' do
matcher = VCR::RequestMatcher.new(stub(:body => 'id=7'), [:body])
- matcher.body.should == 'id=7'
+ matcher.body.should eq('id=7')
end
it 'returns nil when the match attributes do not include :body' do
@@ -115,7 +115,7 @@ def self.for_matcher(*attributes, &block)
describe '#headers' do
it 'returns the request headers when the match attributes include :headers' do
matcher = VCR::RequestMatcher.new(stub(:headers => { 'key' => 'value' }), [:headers])
- matcher.headers.should == { 'key' => 'value' }
+ matcher.headers.should eq({ 'key' => 'value' })
end
it 'returns nil when the match attributes do not include :headers' do
@@ -152,14 +152,14 @@ def matcher_with_headers(headers)
describe '#hash' do
it 'returns the same code for two objects when #match_attributes, #method, #uri, #body and #headers are the same, even when the request object is different' do
m1, m2 = matchers_varying_on(:request)
- m1.hash.should == m2.hash
+ m1.hash.should eq(m2.hash)
end
it 'returns the same code for two objects when the matchers are the same, but #match_attributes has its elements in a different order' do
m1, m2 = matcher, matcher
m1.match_attributes = [:method, :uri, :body, :headers]
m2.match_attributes = [:method, :body, :uri, :headers]
- m1.hash.should == m2.hash
+ m1.hash.should eq(m2.hash)
end
[:match_attributes, :method, :uri, :body, :headers].each do |different_attr|
@@ -173,19 +173,19 @@ def matcher_with_headers(headers)
it 'returns the same code for the same headers' do
m1 = matcher_with_headers('x-http-header' => ['val1'])
m2 = matcher_with_headers('x-http-header' => ['val1'])
- m1.hash.should == m2.hash
+ m1.hash.should eq(m2.hash)
end
it 'returns the same code when the header keys are ordered differently' do
m1 = matcher_with_headers('x-http-header1' => ['val1'], 'x-http-header2' => ['val2'])
m2 = matcher_with_headers('x-http-header2' => ['val2'], 'x-http-header1' => ['val1'])
- m1.hash.should == m2.hash
+ m1.hash.should eq(m2.hash)
end
it 'returns the same code when the header value arrays are ordered differently' do
m1 = matcher_with_headers('x-http-header' => ['val1', 'val2'])
m2 = matcher_with_headers('x-http-header' => ['val2', 'val1'])
- m1.hash.should == m2.hash
+ m1.hash.should eq(m2.hash)
end
it 'returns a different code when the header values are different' do
View
12 spec/vcr/structs/http_interaction_spec.rb
@@ -6,7 +6,7 @@
sig = mock('request signature')
sig.should_receive(attr).and_return(:the_value)
instance = described_class.new(sig, nil)
- instance.send(attr).should == :the_value
+ instance.send(attr).should eq(:the_value)
end
end
@@ -62,23 +62,23 @@
[:request, :response].each do |part|
it "replaces the sensitive text in the #{part} header keys and values" do
- subject.send(part).headers.should == {
+ subject.send(part).headers.should eq({
'x-http-AAA' => ['bar23', '23AAA'],
'x-http-bar' => ['AAA23', '18']
- }
+ })
end
it "replaces the sensitive text in the #{part} body" do
- subject.send(part).body.should == "The body AAA this is (AAA-Foo)"
+ subject.send(part).body.should eq("The body AAA this is (AAA-Foo)")
end
end
it 'replaces the sensitive text in the response status' do
- subject.response.status.message.should == 'OK AAA'
+ subject.response.status.message.should eq('OK AAA')
end
it 'replaces sensitive text in the request URI' do
- subject.request.uri.should == 'http://example-AAA.com:80/AAA/'
+ subject.request.uri.should eq('http://example-AAA.com:80/AAA/')
end
end
end
View
14 spec/vcr/structs/request_spec.rb
@@ -4,7 +4,7 @@
describe '#matcher' do
it 'returns a matcher with the given request' do
req = VCR::Request.new
- req.matcher([:uri]).request.should == req
+ req.matcher([:uri]).request.should eq(req)
end
it 'returns a matcher with the given match_attributes' do
@@ -18,7 +18,7 @@
context 'when given no arguments' do
it 'returns the HTTP method' do
- subject.method.should == :get
+ subject.method.should eq(:get)
end
end
@@ -26,7 +26,7 @@
it 'returns the method object for the named method' do
m = subject.method(:class)
m.should be_a(Method)
- m.call.should == described_class
+ m.call.should eq(described_class)
end
end
end
@@ -42,13 +42,13 @@
end
it { should be_instance_of(VCR::Request) }
- its(:method) { should == :post }
- its(:body) { should == 'id=7' }
- its(:headers) { should == { "content-type" => ["application/x-www-form-urlencoded"] } }
+ its(:method) { should eq(:post) }
+ its(:body) { should eq('id=7') }
+ its(:headers) { should eq({ "content-type" => ["application/x-www-form-urlencoded"] }) }
it 'sets the uri using the http_stubbing_adapter.request_uri' do
VCR.http_stubbing_adapter.should_receive(:request_uri).with(net_http, request).and_return('foo/bar')
- subject.uri.should == 'foo/bar'
+ subject.uri.should eq('foo/bar')
end
end
View
10 spec/vcr/structs/response_spec.rb
@@ -6,9 +6,9 @@
subject { described_class.from_net_http_response(response) }
it { should be_instance_of(described_class) }
- its(:body) { should == 'The response from example.com' }
- its(:http_version) { should == '1.1' }
- its(:headers) { should == {
+ its(:body) { should eq('The response from example.com') }
+ its(:http_version) { should eq('1.1') }
+ its(:headers) { should eq({
"last-modified" => ['Tue, 15 Nov 2005 13:24:10 GMT'],
"etag" => ["\"24ec5-1b6-4059a80bfd280\""],
"content-type" => ["text/html; charset=UTF-8"],
@@ -16,12 +16,12 @@
"server" => ['Apache/2.2.3 (CentOS)'],
"content-length" => ['438'],
"accept-ranges" => ['bytes']
- } }
+ }) }
it 'assigns the status using VCR::ResponseStatus.from_net_http_response' do
VCR::ResponseStatus.should respond_to(:from_net_http_response)
VCR::ResponseStatus.should_receive(:from_net_http_response).with(response).and_return(:the_status)
- subject.status.should == :the_status
+ subject.status.should eq(:the_status)
end
end
View
4 spec/vcr/structs/response_status_spec.rb
@@ -6,8 +6,8 @@
subject { described_class.from_net_http_response(response) }
it { should be_instance_of(described_class) }
- its(:code) { should == 200 }
- its(:message) { should == 'OK' }
+ its(:code) { should eq(200) }
+ its(:message) { should eq('OK') }
end
it_performs 'status message normalization' do
View
4 spec/vcr/test_frameworks/cucumber_spec.rb
@@ -18,7 +18,7 @@ def test_tag(cassette_attribute, tag, expected_value)
VCR.current_cassette.should be_nil
before_blocks_for_tags[tag].call
- VCR.current_cassette.send(cassette_attribute).should == expected_value
+ VCR.current_cassette.send(cassette_attribute).should eq(expected_value)
after_blocks_for_tags[tag].call
VCR.current_cassette.should be_nil
@@ -54,7 +54,7 @@ def test_tag(cassette_attribute, tag, expected_value)
it 'returns the list of cucumber tags' do
subject.tags 'tag1', 'tag2'
subject.tags 'tag3', 'tag4'
- described_class.tags[-4, 4].should == %w(@tag1 @tag2 @tag3 @tag4)
+ described_class.tags[-4, 4].should eq(%w(@tag1 @tag2 @tag3 @tag4))
end
end
end
View
6 spec/vcr/test_frameworks/rspec_spec.rb
@@ -20,7 +20,7 @@ def self.perform_test(context_name, expected_cassette_name, *args, &block)
end
it "creates a cassette named '#{expected_cassette_name}" do
- VCR.current_cassette.name.should == expected_cassette_name
+ VCR.current_cassette.name.should eq(expected_cassette_name)
end
module_eval(&block) if block
@@ -31,7 +31,7 @@ def self.perform_test(context_name, expected_cassette_name, *args, &block)
perform_test 'when called with an explicit name and some options', 'explicit_name', 'explicit_name', :match_requests_on => [:method, :host] do
it 'uses the provided cassette options' do
- VCR.current_cassette.match_requests_on.should == [:method, :host]
+ VCR.current_cassette.match_requests_on.should eq([:method, :host])
end
end
@@ -39,7 +39,7 @@ def self.perform_test(context_name, expected_cassette_name, *args, &block)
perform_test 'when called with some options', 'VCR::RSpec::Macros/#use_vcr_cassette/when called with some options', :match_requests_on => [:method, :host] do
it 'uses the provided cassette options' do
- VCR.current_cassette.match_requests_on.should == [:method, :host]
+ VCR.current_cassette.match_requests_on.should eq([:method, :host])
end
end
end
View
12 spec/vcr/util/hooks_spec.rb
@@ -32,7 +32,7 @@ class HooksClass
invocations.should be_empty
subject.invoke_hook(:before_foo, :green)
- invocations.should == [:callback_1, :callback_2]
+ invocations.should eq([:callback_1, :callback_2])
end
it 'invokes each of the :before_foo callbacks with no tag' do
@@ -40,7 +40,7 @@ class HooksClass
subject.before_foo { invocations << :no_tag_2 }
subject.invoke_hook(:before_foo, :green)
- invocations.should == [:no_tag_1, :no_tag_2]
+ invocations.should eq([:no_tag_1, :no_tag_2])
end
it 'does not invoke any callbacks with a different tag' do
@@ -57,7 +57,7 @@ class HooksClass
invocations.should be_empty
subject.invoke_hook(:before_foo, nil)
- invocations.should == [:callback_1, :callback_2]
+ invocations.should eq([:callback_1, :callback_2])
end
it 'does not invoke :before_bar callbacks' do
@@ -75,19 +75,19 @@ class HooksClass
it 'passes along the provided arguments to the callback' do
subject.before_foo &lambda { |a, b| invocations << [a, b] }
subject.invoke_hook(:before_foo, nil, :arg1, :arg2)
- invocations.flatten.should == [:arg1, :arg2]
+ invocations.flatten.should eq([:arg1, :arg2])
end
it 'only passes along 1 argument when the block accepts only 1 arguments' do
subject.before_foo &lambda { |a| invocations << a }
subject.invoke_hook(:before_foo, nil, :arg1, :arg2)
- invocations.flatten.should == [:arg1]
+ invocations.flatten.should eq([:arg1])
end
it 'passes along all arguments when the block accepts a variable number of args' do
subject.before_foo &lambda { |*a| invocations << a }
subject.invoke_hook(:before_foo, nil, :arg1, :arg2)
- invocations.flatten.should == [:arg1, :arg2]
+ invocations.flatten.should eq([:arg1, :arg2])
end
end
end
View
20 spec/vcr_spec.rb
@@ -13,8 +13,8 @@ def insert_cassette(name = :cassette_test)
it 'takes over as the #current_cassette' do
orig_cassette = VCR.current_cassette
new_cassette = insert_cassette
- new_cassette.should_not == orig_cassette
- VCR.current_cassette.should == new_cassette
+ new_cassette.should_not eq(orig_cassette)
+ VCR.current_cassette.should eq(new_cassette)
end
it 'raises an error if the stack of inserted cassettes already contains a cassette with the same name' do
@@ -34,7 +34,7 @@ def insert_cassette(name = :cassette_test)
it 'returns the ejected cassette' do
cassette = insert_cassette
- VCR.eject_cassette.should == cassette
+ VCR.eject_cassette.should eq(cassette)
end
it 'returns the #current_cassette to the previous one' do
@@ -64,7 +64,7 @@ def insert_cassette(name = :cassette_test)
it 'yields the cassette instance if the block expects a variable number of args' do
VCR.use_cassette('name', :record => :new_episodes) do |*args|
- args.size.should == 1
+ args.size.should eq(1)
args.first.should equal(VCR.current_cassette)
end
end
@@ -92,7 +92,7 @@ def insert_cassette(name = :cassette_test)
VCR.config do |obj|
yielded_object = obj
end
- yielded_object.should == VCR::Config
+ yielded_object.should eq(VCR::Config)
end
it "sets http_stubbing_adapter.http_connections_allowed to the configured default" do
@@ -116,7 +116,7 @@ def insert_cassette(name = :cassette_test)
c.ignore_hosts 'example.com', 'example.org'
end
- VCR::HttpStubbingAdapters::FakeWeb.send(:ignored_hosts).should == %w[example.com example.org]
+ VCR::HttpStubbingAdapters::FakeWeb.send(:ignored_hosts).should eq(%w[example.com example.org])
end
end
@@ -138,10 +138,10 @@ def insert_cassette(name = :cassette_test)
it 'returns a multi object proxy for the configured stubbing libraries when multiple libs are configured', :unless => RUBY_PLATFORM == 'java' do
VCR::Config.stub_with :fakeweb, :typhoeus
- VCR.http_stubbing_adapter.proxied_objects.should == [
+ VCR.http_stubbing_adapter.proxied_objects.should eq([
VCR::HttpStubbingAdapters::FakeWeb,
VCR::HttpStubbingAdapters::Typhoeus
- ]
+ ])
end
{
@@ -152,7 +152,7 @@ def insert_cassette(name = :cassette_test)
}.each do |symbol, klass|
it "returns #{klass} for :#{symbol}" do
VCR::Config.stub_with symbol
- VCR.http_stubbing_adapter.should == klass
+ VCR.http_stubbing_adapter.should eq(klass)
end
end
@@ -296,7 +296,7 @@ def insert_cassette(name = :cassette_test)
VCR.should_not be_turned_on
end
- yielded.should == true
+ yielded.should eq(true)
VCR.should be_turned_on
end
Please sign in to comment.
Something went wrong with that request. Please try again.