Sha256: 6f6110b2a401725d68a0c8ff6d96e085986a1b1f7babd6fdb90d698043f1c735

Contents?: true

Size: 487 Bytes

Versions: 31

Compression:

Stored size: 487 Bytes

Contents

module Mocha
  module BlockMatchers
    class OptionalBlock
      def match?(_actual_block)
        true
      end

      def mocha_inspect; end
    end

    class BlockGiven
      def match?(actual_block)
        !actual_block.nil?
      end

      def mocha_inspect
        'with block given'
      end
    end

    class NoBlockGiven
      def match?(actual_block)
        actual_block.nil?
      end

      def mocha_inspect
        'with no block given'
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
mocha-2.7.1 lib/mocha/block_matcher.rb
mocha-2.7.0 lib/mocha/block_matcher.rb
mocha-2.6.1 lib/mocha/block_matcher.rb
mocha-2.6.0 lib/mocha/block_matcher.rb
mocha-2.5.0 lib/mocha/block_matcher.rb
mocha-2.4.5 lib/mocha/block_matcher.rb
mocha-2.4.4 lib/mocha/block_matcher.rb
mocha-2.4.3 lib/mocha/block_matcher.rb
mocha-2.4.2 lib/mocha/block_matcher.rb
mocha-2.4.1 lib/mocha/block_matcher.rb
mocha-2.4.0 lib/mocha/block_matcher.rb
mocha-2.2.0 lib/mocha/block_matcher.rb
mocha-2.1.0 lib/mocha/block_matcher.rb
mocha-2.0.4 lib/mocha/block_matcher.rb
mocha-2.0.3 lib/mocha/block_matcher.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/mocha-2.0.2/lib/mocha/block_matcher.rb
mocha-2.0.2 lib/mocha/block_matcher.rb
mocha-1.16.1 lib/mocha/block_matcher.rb
mocha-1.15.1 lib/mocha/block_matcher.rb
mocha-2.0.1 lib/mocha/block_matcher.rb