Sha256: 70b17bfcbc323e643a07cc157ca26ceea2a5d76e095863765004f4e67b310058
Contents?: true
Size: 960 Bytes
Versions: 5
Compression:
Stored size: 960 Bytes
Contents
#$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') require 'rspec' require 'lumberg' require 'lumberg/exceptions' require 'webmock/rspec' require 'vcr' require 'timeout' # Load supporting files in spec/support Dir["#{Lumberg::base_path}/../spec/support/**/*.rb"].each do |f| require f end VCR.configure do |c| c.cassette_library_dir = 'spec/vcr_cassettes' c.hook_into :webmock c.default_cassette_options = { record: :none } end def live_test? !ENV['WHM_REAL'].nil? end def requires_attr(attr, &block) expect { block.call }.to raise_error(Lumberg::WhmArgumentError, /Missing required parameter: #{attr}/i) end RSpec.configure do |c| c.extend VCR::RSpec::Macros c.before(:each) do if live_test? @whm_hash = ENV['WHM_HASH'].dup @whm_host = ENV['WHM_HOST'].dup else @whm_hash = 'iscool' @whm_host = 'myhost.com' Resolv.stub(:getaddress).with(@whm_host).and_return('11.22.33.44') end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
lumberg-4.1.0 | spec/spec_helper.rb |
lumberg-4.0.0 | spec/spec_helper.rb |
lumberg-3.1.0 | spec/spec_helper.rb |
lumberg-3.0.0 | spec/spec_helper.rb |
lumberg-2.0.1 | spec/spec_helper.rb |