class Mspec::Expect

Attributes

value[R]

Public Class Methods

new(value) click to toggle source
# File lib/m-spec/core/expect.rb, line 5
def initialize(value)
  @value = value
end

Public Instance Methods

to(matcher) click to toggle source
# File lib/m-spec/core/expect.rb, line 9
def to(matcher)
  begin
    raise SpecError.new unless matcher.check(@value)
  rescue SpecError => e
    data = e
  end

  SpecResult.new(self, matcher, data)
end