Sha256: 04bb485beec9560a506a9e2ce3458404015d24a61f9015fc7b8368ccf46812d5

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

Bundler.setup :default, :test

require "nephophobia"

require "fakeweb"
require "minitest/spec"
require "nokogiri"
require "vcr"

class MiniTest::Unit::TestCase
  def cassette_for cassette
    c = VCR::Cassette.new(cassette).send :recorded_interactions

    Nokogiri::XML::Document.parse c.first.response.body
  end
end

VCR.config do |c|
  c.stub_with :fakeweb
  c.cassette_library_dir     = "test/cassettes"
  c.default_cassette_options = { :record => :none }
end

class Client
  def self.with type, options = {}
    client_options = case type
      when :user
        { :project => "vcr_project" }
      when :admin ; {
        :access_key => "1d7a687b-0065-44d6-9611-5bf6c6c72424",
        :secret_key => "fd3053fd-25c2-48f8-b893-9f22661ec63c",
        :project    => "production"
      }
    end.merge(:host => "10.1.170.32")

    Nephophobia::Client.new client_options.merge options
  end
end

class Time
  class << self
    alias_method :real_now, :now
    def now
      Time.utc 1999, 12, 31, 19, 59, 59
    end
  end
end

MiniTest::Unit.autorun

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nephophobia-0.0.9 test/test_helper.rb
nephophobia-0.0.8 test/test_helper.rb
nephophobia-0.0.7 test/test_helper.rb