Sha256: 6a5c9f73f02da7a220ba8bb00ea130cc4832138a9781702a714e103a799724e3

Contents?: true

Size: 784 Bytes

Versions: 15

Compression:

Stored size: 784 Bytes

Contents

if ENV['COVERAGE']
  raise "simplecov only works on 1.9" unless RUBY_PLATFORM >= "1.9"
  require 'simplecov'
  SimpleCov.start {
    add_filter "spec/"
  }
end

$:.unshift File.expand_path("../../lib", __FILE__)
require "bamboo-client"

module Bamboo::Client::SpecHelper
  def xml_fixture(name)
    path = File.join fixture_path("#{name}.xml")

    Nokogiri.XML File.read(path)
  end

  def json_fixture(name)
    path = File.join fixture_path("#{name}.json")

    JSON.parse File.read(path)
  end

  def fixture_path(file)
    dir = File.expand_path("../fixtures", __FILE__)

    File.join dir, file
  end

  class Wrapper
    attr_reader :obj

    def initialize(obj, *extra_args)
      @obj = obj
    end
  end
end

RSpec.configure do |c|
  c.include Bamboo::Client::SpecHelper
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bamboo-client-0.1.9 spec/spec_helper.rb
bamboo-client-0.1.8 spec/spec_helper.rb
bamboo-client-0.1.7 spec/spec_helper.rb
bamboo-client-0.1.6 spec/spec_helper.rb
bamboo-client-0.1.5 spec/spec_helper.rb
bamboo-client-0.1.4 spec/spec_helper.rb
bamboo-client-0.1.3 spec/spec_helper.rb
bamboo-client-0.1.2 spec/spec_helper.rb
bamboo-client-0.1.1 spec/spec_helper.rb
bamboo-client-0.1.0 spec/spec_helper.rb
bamboo-client-0.0.9 spec/spec_helper.rb
bamboo-client-0.0.8 spec/spec_helper.rb
bamboo-client-0.0.6 spec/spec_helper.rb
bamboo-client-0.0.5 spec/spec_helper.rb
bamboo-client-0.0.4 spec/spec_helper.rb