Parent

Class/Module Index [+]

Quicksearch

Spec::Matchers::BeSameAs

Public Class Methods

new(*args, &block) click to toggle source
# File lib/spec/matchers/be.rb, line 182
def initialize(*args, &block)
  @expected = args.shift
  @args = args
end

Public Instance Methods

description() click to toggle source
# File lib/spec/matchers/be.rb, line 200
def description
  "be #{expected_to_sentence}#{args_to_sentence}"
end
failure_message_for_should() click to toggle source
# File lib/spec/matchers/be.rb, line 192
def failure_message_for_should
  "expected #{@expected}, got #{@actual.inspect}"
end
failure_message_for_should_not() click to toggle source
# File lib/spec/matchers/be.rb, line 196
def failure_message_for_should_not
  "expected not #{@expected}, got #{@actual.inspect}"
end
matches?(actual) click to toggle source
# File lib/spec/matchers/be.rb, line 187
def matches?(actual)
  @actual = actual
  @actual.equal?(@expected)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.