Sha256: da862bf29eb962070357ca943acec73faa59c629d1cc6623097660cb96931d88
Contents?: true
Size: 1.05 KB
Versions: 4
Compression:
Stored size: 1.05 KB
Contents
# Running specs by default will use VCR. # Can disable via: VCR=0 rake or clean out vcr fixtures via rake clean:vcr. # Using a ENV VCR flag so that both ruby and cli specs always either use # vcr or do not use vcr. It's confusing to only have only ruby use vcr # and cli specs not using vcr and vice versa. ENV['VCR'] ? ENV['VCR'] : ENV['VCR'] = '1' ENV['TEST'] = '1' # require 'simplecov' # SimpleCov.start require "pp" root = File.expand_path('../../', __FILE__) require "#{root}/lib/thor_template" module Helpers def execute(cmd) puts "Running: #{cmd}" if ENV['DEBUG'] out = `#{cmd}` puts out if ENV['DEBUG'] out end end RSpec.configure do |c| c.include Helpers c.before(:all) do FileUtils.mkdir('tmp') unless File.exist?('tmp') FileUtils.rm_rf("tmp") FileUtils.mkdir("tmp") end c.around(:each) do |example| VCR.use_cassette(example.metadata[:full_description], :serialize_with => :json) do example.run end if ENV['VCR'] == '1' end end VCR.configure do |config| config.ignore_hosts 'codeclimate.com' end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
thor_template-2.2.1 | spec/spec_helper.rb |
thor_template-2.2.0 | spec/spec_helper.rb |
thor_template-2.1.1 | spec/spec_helper.rb |
thor_template-2.1.0 | spec/spec_helper.rb |