Sha256: 2114a4d63ff758b4728b2d2795c20a185d6cb2b10bba2758c561f0c4cef86784

Contents?: true

Size: 269 Bytes

Versions: 18

Compression:

Stored size: 269 Bytes

Contents

RSpec::Matchers.define(:enumerate_method) do |obj, meth|
  match do |enum|
    if RUBY_VERSION < '1.9'
      enum.is_a?(Enumerable::Enumerator)
    else
      enum.is_a?(Enumerator) &&
        (enum.inspect == "#<Enumerator: #{obj.inspect}:#{meth}>")
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
gorillib-0.6.0 spec/support/matchers/enumerate_method.rb
gorillib-0.5.2 spec/support/matchers/enumerate_method.rb
gorillib-0.5.0 spec/support/matchers/enumerate_method.rb
gorillib-0.4.2 spec/support/matchers/enumerate_method.rb
gorillib-0.4.2pre spec/support/matchers/enumerate_method.rb
gorillib-0.4.0pre spec/support/matchers/enumerate_method.rb
gorillib-0.4.1pre spec/support/matchers/enumerate_method.rb
gorillib-0.1.11 spec/support/matchers/enumerate_method.rb
gorillib-0.1.9 spec/support/matchers/enumerate_method.rb
gorillib-0.1.8 spec/support/matchers/enumerate_method.rb
gorillib-0.1.7 spec/support/matchers/enumerate_method.rb
gorillib-0.1.6 spec/support/matchers/enumerate_method.rb
gorillib-0.1.5 spec/support/matchers/enumerate_method.rb
gorillib-0.1.4 spec/support/matchers/enumerate_method.rb
gorillib-0.1.3 spec/support/matchers/enumerate_method.rb
gorillib-0.1.2 spec/support/matchers/enumerate_method.rb
gorillib-0.1.1 spec/support/matchers/enumerate_method.rb
gorillib-0.1.0 spec/support/matchers/enumerate_method.rb