Sha256: dfed4d09d773aa773ec6967fe3e5a943efaa45fed90ad9060d57b7f4907c10d9

Contents?: true

Size: 820 Bytes

Versions: 17

Compression:

Stored size: 820 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'simplecov'
require 'coveralls'

SimpleCov.command_name 'Unit Tests'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
SimpleCov.start

require 'minitest'
require 'minitest/autorun'
require 'minitest/spec'
require 'minitest/mock'
require 'webmock/minitest'
require 'hashie/mash'

require 'pmp'

# helper method to create mashified test docs, that look like what comes out of the faraday middleware
def mashify(body)
  case body
  when Hash
    ::Hashie::Mash.new(body)
  when Array
    body.map { |item| parse(item) }
  else
    body
  end
end

def json_fixture(name)
  mashify(JSON.parse(json_file(name)))
end

def json_file(name)
  File.read( File.dirname(__FILE__) + "/fixtures/#{name}.json")
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pmp-0.5.7 spec/spec_helper.rb
pmp-0.5.6 spec/spec_helper.rb
pmp-0.5.5 spec/spec_helper.rb
pmp-0.5.4 spec/spec_helper.rb
pmp-0.5.3 spec/spec_helper.rb
pmp-0.5.2 spec/spec_helper.rb
pmp-0.5.1 spec/spec_helper.rb
pmp-0.5.0 spec/spec_helper.rb
pmp-0.4.1 spec/spec_helper.rb
pmp-0.4.0 spec/spec_helper.rb
pmp-0.3.2 spec/spec_helper.rb
pmp-0.3.1 spec/spec_helper.rb
pmp-0.3.0 spec/spec_helper.rb
pmp-0.2.4 spec/spec_helper.rb
pmp-0.2.3 spec/spec_helper.rb
pmp-0.2.2 spec/spec_helper.rb
pmp-0.2.1 spec/spec_helper.rb