Sha256: c9b52abd65fb5a3cf51d00af26722624a174472065b2c77cedea5cd3174fdae9
Contents?: true
Size: 686 Bytes
Versions: 10
Compression:
Stored size: 686 Bytes
Contents
module Remarkable module Specs module Matchers class ContainMatcher < Remarkable::Base def initialize(*values) @values = values end def matches?(subject) @subject = subject assert_matcher_for(@values) do |value| @value = value included? end end def included? return true if @subject.include?(@value) @expectation = "#{@value} is included in #{@subject.inspect}" false end end def contain(*args, &block) ContainMatcher.new(*args, &block).spec(self) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems