Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

change deprecation warning tests to have a more lenient error detection #244

Closed
wants to merge 1 commit into from

2 participants

@ScotterC

Loosened tests for deprecation warnings. Happy New Year!

@myronmarston
Owner

Rebased and merged in 95b2618.

(Due to merging your other PR this could no longer be merged automatically on the github UI).

@myronmarston
Owner

Thanks again!

@ScotterC ScotterC deleted the branch
@ScotterC

Thanks for being patient with me, and thanks for such a useful library!

@myronmarston
Owner

No patience was needed :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 8 deletions.
  1. +4 −8 spec/vcr/deprecations_spec.rb
View
12 spec/vcr/deprecations_spec.rb
@@ -14,8 +14,7 @@
end
it 'prints a deprecation warning' do
- VCR.should_receive(:warn).with \
- "WARNING: `VCR.config` is deprecated. Use VCR.configure instead."
+ VCR.should_receive(:warn).with(/VCR.config.*deprecated/i)
VCR.config { }
end
@@ -27,8 +26,7 @@
end
it 'prints a deprecation warning' do
- VCR.should_receive(:warn).with \
- "WARNING: `VCR::Config` is deprecated. Use VCR.configuration instead."
+ VCR.should_receive(:warn).with(/VCR::Config.*deprecated/i)
VCR::Config
end
@@ -46,8 +44,7 @@
end
it 'prints a deprecation warning' do
- VCR::Cassette.should_receive(:warn).with \
- "WARNING: `VCR::Cassette::MissingERBVariableError` is deprecated. Use `VCR::Errors::MissingERBVariableError` instead."
+ VCR::Cassette.should_receive(:warn).with(/VCR::Cassette::MissingERBVariableError.*deprecated/i)
VCR::Cassette::MissingERBVariableError
end
@@ -66,8 +63,7 @@
end
it 'prints a deprecation warning' do
- VCR.configuration.should_receive(:warn).with \
- "WARNING: `VCR.config { |c| c.stub_with ... }` is deprecated. Use `VCR.configure { |c| c.hook_into ... }` instead."
+ VCR.configuration.should_receive(:warn).with(/stub_with.*deprecated/i)
VCR.configure { |c| c.stub_with :fakeweb, :excon }
end
Something went wrong with that request. Please try again.