Sha256: b4d46369e79c6ea62ff28ab8f6865a36ca130aa815be9b3e1e8756b9cc6970b1
Contents?: true
Size: 670 Bytes
Versions: 9
Compression:
Stored size: 670 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) ContainMatcher.new(*args).spec(self) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems