Sha256: f00aba14bedea67e2757fb4c79d5e0953c2a9443c4d3eb61dfb1ce82502d104f

Contents?: true

Size: 803 Bytes

Versions: 6

Compression:

Stored size: 803 Bytes

Contents

require 'rubygems'
require 'spec/more'

TESTFILES = File.expand_path(File.dirname(__FILE__)) + '/testfiles'

module Bacon
  class Context
    def hash_match(hash, obj)
      hash.each do |k,v|
        if v.is_a?(Hash)
          hash_match(v, obj.send(k.to_sym))
        else
          
          if v.is_a?(Float)
            obj.send(k.to_sym).should.be.close v, 0.00000001
          else
            puts "\n**********************************\n#{k}: #{v} but was #{obj.send(k.to_sym)}" if obj.send(k.to_sym) != v
            obj.send(k.to_sym).should.equal v
          end
        end
      end
    end
  end
end

class File
  # unlinks the file and won't complain if it doesn't exist
  def self.unlink_f(file)
    if File.exist?(file)
      File.unlink(file)
    end
  end
end

Bacon.summary_on_exit

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ms-msrun-0.3.6 spec/spec_helper.rb
ms-msrun-0.3.5 spec/spec_helper.rb
ms-msrun-0.3.4 spec/spec_helper.rb
ms-msrun-0.3.3 spec/spec_helper.rb
ms-msrun-0.3.2 spec/spec_helper.rb
ms-msrun-0.3.1 spec/spec_helper.rb