Bundler.setup :default, :test require "minitest/spec" require "mocha" Dir[File.join "./lib", "**", "*.rb"].each { |f| require f } class MiniTest::Unit::TestCase Connection = Rubineti::Compute.new( :host => "ganeti.primary", :user => "fake", :password => "credentials" ) Job_Matcher = %r{^\d{4}$} Json_Headers_Matcher = %r{#{Rubineti::Compute::Headers[:json]}} Not_Implemented_Matcher = %r{^WARNING: [A-Z][a-z]+#[a-z]+_[a-z_]+ not implemented.$} require "yajl" def cassette_for cassette c = VCR::Cassette.new(cassette).send :recorded_interactions Yajl::Parser.parse c.first.response.body end end require "vcr" require "webmock" WebMock.disable_net_connect! :allow => "ganeti.primary" VCR.config do |c| c.stub_with :webmock c.cassette_library_dir = "test/fixtures/cassettes" c.default_cassette_options = { :record => :new_episodes } end MiniTest::Unit.autorun