Commit 23692ea0 authored by Eloy Duran's avatar Eloy Duran

Instead of removing the VCR cache, namespace the cache by Ruby version.

See d3bd2989.
parent 97840d45
......@@ -105,16 +105,16 @@ namespace :spec do
end
desc "Run the functional specs"
task :functional => :clean_env do
task :functional => :unpack_fixture_tarballs do
sh "bundle exec bacon #{specs('functional/**')}"
end
desc "Run the integration spec"
task :integration => :clean_env do
task :integration => :unpack_fixture_tarballs do
sh "bundle exec bacon spec/integration_spec.rb"
end
task :all => :clean_env do
task :all => :unpack_fixture_tarballs do
sh "bundle exec bacon #{specs('**')}"
end
......@@ -143,13 +143,6 @@ namespace :spec do
end
end
end
desc "Removes the stored VCR fixture"
task :clean_vcr do
sh "rm -f spec/fixtures/vcr/tarballs.yml"
end
task :clean_env => [:clean_vcr, :unpack_fixture_tarballs]
end
namespace :examples do
......
......@@ -55,7 +55,9 @@ require 'vcr'
require 'webmock'
VCR.configure do |c|
c.cassette_library_dir = (ROOT + 'spec/fixtures/vcr').to_s
# Namespace the fixture by the Ruby version, because different Ruby versions
# can lead to different ways the data is interpreted.
c.cassette_library_dir = (ROOT + "spec/fixtures/vcr/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}").to_s
c.hook_into :webmock # or :fakeweb
c.allow_http_connections_when_no_cassette = true
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment