Module: Ramcrest::Is

Defined in:
lib/ramcrest/is.rb

Defined Under Namespace

Classes: Matcher

Class Method Summary collapse

Class Method Details

.is(expected) ⇒ Object



12
13
14
# File 'lib/ramcrest/is.rb', line 12

def is(expected)
  Matcher.new(Ramcrest::EqualTo.to_matcher(expected), Ramcrest.is_matcher?(expected))
end

.to_matcher(possible_matcher) ⇒ Object



5
6
7
8
# File 'lib/ramcrest/is.rb', line 5

def self.to_matcher(possible_matcher)
  return possible_matcher if Ramcrest.is_matcher?(possible_matcher)
  Ramcrest::Is.is(possible_matcher)
end