Sha256: fb8f1b74475da70f94f77a0bc073396dd17dd1a193232cc48680c3c8e8979616

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'hash_syntax'
require 'rspec'
require 'rspec/autorun'

RSpec::Matchers.define :transform_to do |output, target|
  match do |input|
    @result = HashSyntax::Transformer.transform(input, target => true)
    @result == output
  end
  
  failure_message_for_should do |input|
    "expected '#{input}' to correct to #{output}, not #{@result}"
  end
  
  diffable
end

RSpec.configure do |config|
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hash_syntax-1.0.0 spec/spec_helper.rb