Sha256: e5cb8e6aa062621690878e9ec6490fc0bcddbbcedb72e5529e5c67defb43ced2
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
module Remarkable module Specs module Matchers class ContainMatcher < Remarkable::Base def initialize(*values) @values = values end def matches?(subject) @subject = subject assert_collection(nil, @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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
remarkable-3.1.8 | spec/matchers/contain_matcher.rb |