Sha256: 21d9530896f409a14d13d348a0b0424f9143cbccab1dcf398f5a40e1756a6e78

Contents?: true

Size: 869 Bytes

Versions: 1

Compression:

Stored size: 869 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'bundler/setup'
require 'rspec'

require 'rubygems'
require 'confstruct'

require 'simplecov'
SimpleCov.start

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    # our specs written a long time ago still use :should syntax
    expectations.syntax = [:should, :expect]
  end
end




# Two hashes are equal even if one has symbols as keys
# and another strings. works on nested hashes too. 
require 'hashie'
class IndifferentHashieHash < Hash
  include Hashie::Extensions::MergeInitializer
  include Hashie::Extensions::IndifferentAccess
end

RSpec::Matchers.define :match_indifferently do |expected|
  match do |actual|
    IndifferentHashieHash.new(actual.to_hash) ==  IndifferentHashieHash.new(expected.to_hash)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
confstruct-1.1.0 spec/spec_helper.rb