Concept "Message Expectations"

From SMW CindyKate by dataspects
Component 321531
Jump to navigation Jump to search
[edit]
Keywords/Contexts

Testing · Rspec

Annotations
{{#compound_query:Component 321531Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.UseCaseMotivation;?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning
Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.Concept "Message Expectations";?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.Concept "Message Expectations";?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning
name=MotivationsDeclaredOnThisPageResultItem|link=none}}
Motivations
Lua error in Module:Motivations at line 23: attempt to concatenate field 'hasReasoning' (a nil value).
[edit]

Content


= method-level applied to object-level concepts

my_double.should_receive(:some_method).and_return("something") # raises an error if never called

Counts

my_double.should_receive(:some_method).exactly.once

Negative expectation

Expected arguments

Argument Matchers

  • instance_of
  • anything
  • any_args
  • no_args
  • hash_including
  • hash_not_including
  • Regexes

Custom Argument Matchers

Return consecutive values

Throwing/raising an exception

Ordering

Message expectations can override stubs