Class: Remarkable::Matcher::Base
- Inherits:
-
Object
- Object
- Remarkable::Matcher::Base
show all
- Includes:
- DSL
- Defined in:
- lib/remarkable/matcher_base.rb
Direct Known Subclasses
ActiveRecord::Matchers::AllowMassAssignmentOfMatcher, ActiveRecord::Matchers::AssociationMatcher, ActiveRecord::Matchers::CallbackMatcher, ActiveRecord::Matchers::ColumnMatcher, ActiveRecord::Matchers::EnsureValueInListMatcher, ActiveRecord::Matchers::EnsureValueInRangeMatcher, ActiveRecord::Matchers::HaveClassMethods, ActiveRecord::Matchers::HaveInstanceMethods, ActiveRecord::Matchers::HaveNamedScope, ActiveRecord::Matchers::HaveReadonlyAttributes, ActiveRecord::Matchers::IndexMatcher, ActiveRecord::Matchers::ProtectAttributes, ActiveRecord::Matchers::ValidateAcceptanceOfMatcher, ActiveRecord::Matchers::ValidateAssociatedMatcher, ActiveRecord::Matchers::ValidateConfirmationOfMatcher, ActiveRecord::Matchers::ValidateLengthOfMatcher, ActiveRecord::Matchers::ValidateNumericalityOfMatcher, ActiveRecord::Matchers::ValidatePresenceOfMatcher, ActiveRecord::Matchers::ValidateUniquenessOfMatcher, Controller::Matchers::AssignMatcher, Controller::Matchers::FilterParams, Controller::Matchers::RenderWithLayout, Controller::Matchers::RespondWith, Controller::Matchers::RespondWithContentType, Controller::Matchers::Route, Controller::Matchers::SetSessionMatcher, Controller::Matchers::SetTheFlashTo
Instance Method Summary
collapse
Methods included from DSL
included, #matches?
Instance Method Details
#failure_message ⇒ Object
11
12
13
|
# File 'lib/remarkable/matcher_base.rb', line 11
def failure_message
"Expected #{expectation} (#{@missing})"
end
|
#negative ⇒ Object
6
7
8
9
|
# File 'lib/remarkable/matcher_base.rb', line 6
def negative
@negative = true
self
end
|
#negative_failure_message ⇒ Object
15
16
17
|
# File 'lib/remarkable/matcher_base.rb', line 15
def negative_failure_message
"Did not expect #{expectation}"
end
|
#spec(spec) ⇒ Object
19
20
21
22
|
# File 'lib/remarkable/matcher_base.rb', line 19
def spec(spec)
@spec = spec
self
end
|