Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Re-upgrade to rspec 2.9.0.rc2.
On 2.9, metadata filter lambdas are only invoked if the named key is present in the metadata hash, so the old way we made :skip_vcr_reset work is no longer supported.
  • Loading branch information
myronmarston committed Mar 15, 2012
1 parent e0034eb commit 4cd88e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions spec/spec_helper.rb
Expand Up @@ -48,9 +48,11 @@ def reset!(hook = :fakeweb)
config.treat_symbols_as_metadata_keys_with_true_values = true

tmp_dir = File.expand_path('../../tmp/cassette_library_dir', __FILE__)
config.before(:each, :skip_vcr_reset => lambda { |v| v != true }) do
VCR.reset!
VCR.configuration.cassette_library_dir = tmp_dir
config.before(:each) do
unless example.metadata[:skip_vcr_reset]
VCR.reset!
VCR.configuration.cassette_library_dir = tmp_dir
end
end

config.after(:each) do
Expand Down
2 changes: 1 addition & 1 deletion vcr.gemspec
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'cucumber', '~> 1.1.4'
s.add_development_dependency 'aruba', '~> 0.4.11'

s.add_development_dependency 'rspec', '~> 2.8.0'
s.add_development_dependency 'rspec', '~> 2.9.0.rc2'
s.add_development_dependency 'shoulda', '~> 2.9.2'

s.add_development_dependency 'fakeweb', '~> 1.3.0'
Expand Down

0 comments on commit 4cd88e1

Please sign in to comment.