Class: Cuprum::Rails::RSpec::Matchers::BeAResultMatcher

Inherits:
Cuprum::RSpec::BeAResultMatcher
  • Object
show all
Defined in:
lib/cuprum/rails/rspec/matchers/be_a_result_matcher.rb

Overview

Asserts the actual object is a result object with the specified properties.

See Also:

  • Cuprum::RSpec::BeAResultMatcher.

Instance Method Summary collapse

Constructor Details

#initialize(expected_class = nil) ⇒ BeAResultMatcher



12
13
14
15
16
# File 'lib/cuprum/rails/rspec/matchers/be_a_result_matcher.rb', line 12

def initialize(expected_class = nil)
  super

   = DEFAULT_VALUE
end

Instance Method Details

#with_metadata(metadata) ⇒ Object Also known as: and_metadata

Sets a metadata expectation on the matcher.

Calls to #matches? will fail unless the result responds to #metadata? and has the specified metadata.



22
23
24
25
26
# File 'lib/cuprum/rails/rspec/matchers/be_a_result_matcher.rb', line 22

def ()
   = 

  self
end