Sha256: 4fbe0933bf0bee7947e9272b9111b1cdbacd05ff0a1ba9c7bfaac67e0367e986

Contents?: true

Size: 497 Bytes

Versions: 1

Compression:

Stored size: 497 Bytes

Contents

module Bitcoin
  module RSpec
    module ArgumentMatchers
      class BlockEvaluatingToMatcher
        def initialize(expected_value)
          @expected_value = expected_value
        end

        def description
          "block_evaluating_to(#{@expected_value.inspect})"
        end

        def ==(other)
          @expected_value == other.()
        end
      end

      def block_evaluating_to(expected_value)
        BlockEvaluatingToMatcher.new(expected_value)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bitcoin-0.1.2 ./lib/bitcoin/rspec/argument_matchers/block_evaluating_to_matcher.rb