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 ...@@ -105,16 +105,16 @@ namespace :spec do
end end
desc "Run the functional specs" desc "Run the functional specs"
task :functional => :clean_env do task :functional => :unpack_fixture_tarballs do
sh "bundle exec bacon #{specs('functional/**')}" sh "bundle exec bacon #{specs('functional/**')}"
end end
desc "Run the integration spec" desc "Run the integration spec"
task :integration => :clean_env do task :integration => :unpack_fixture_tarballs do
sh "bundle exec bacon spec/integration_spec.rb" sh "bundle exec bacon spec/integration_spec.rb"
end end
task :all => :clean_env do task :all => :unpack_fixture_tarballs do
sh "bundle exec bacon #{specs('**')}" sh "bundle exec bacon #{specs('**')}"
end end
...@@ -143,13 +143,6 @@ namespace :spec do ...@@ -143,13 +143,6 @@ namespace :spec do
end end
end 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 end
namespace :examples do namespace :examples do
......
...@@ -55,7 +55,9 @@ require 'vcr' ...@@ -55,7 +55,9 @@ require 'vcr'
require 'webmock' require 'webmock'
VCR.configure do |c| 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.hook_into :webmock # or :fakeweb
c.allow_http_connections_when_no_cassette = true c.allow_http_connections_when_no_cassette = true
end 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