Sha256: 1d35ceceb0d1eb7f6f94b91389482d6d70b0742cd8df934421fd2077d217f4bc

Contents?: true

Size: 361 Bytes

Versions: 3

Compression:

Stored size: 361 Bytes

Contents

require 'bigdecimal'

module MoneyMatcher
  Spec::Matchers.define :be_money do

    match do |amount|
      amount.should be_instance_of(BigDecimal)
    end

    failure_message_for_should do |amount|
      "expected #{amount} to be money (an instance of BigDecimal)"
    end

    description do |amount|
      "expect #{amount} to be money"
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
quicken-0.0.3 spec/support/matchers/money_matcher.rb
quicken-0.0.2 spec/support/matchers/money_matcher.rb
quicken-0.0.1 spec/support/matchers/money_matcher.rb