Sha256: faf621eef003b426717ffea4a8f07319e212eff5c7e14f78b6b4725b1ccb14ed

Contents?: true

Size: 734 Bytes

Versions: 2

Compression:

Stored size: 734 Bytes

Contents

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

require 'bundler/setup'
require 'rspec'
require 'rspec/autorun'

require 'rubygems'
require 'confstruct'

require 'simplecov'
SimpleCov.start

RSpec.configure do |config|
  
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

2 entries across 2 versions & 1 rubygems

Version Path
confstruct-1.0.2 spec/spec_helper.rb
confstruct-1.0.1 spec/spec_helper.rb