Class: Properb::RSpec::ExampleMethods::Assumption
- Inherits:
-
Object
- Object
- Properb::RSpec::ExampleMethods::Assumption
- Defined in:
- lib/properb/rspec/example_methods.rb
Instance Method Summary collapse
-
#initialize(target) ⇒ Assumption
constructor
A new instance of Assumption.
- #to(matcher = nil, message = nil, &block) ⇒ Object
- #to_not(matcher = nil, message = nil, &block) ⇒ Object (also: #not_to)
Constructor Details
#initialize(target) ⇒ Assumption
Returns a new instance of Assumption.
7 8 9 |
# File 'lib/properb/rspec/example_methods.rb', line 7 def initialize(target) @target = target end |
Instance Method Details
#to(matcher = nil, message = nil, &block) ⇒ Object
11 12 13 |
# File 'lib/properb/rspec/example_methods.rb', line 11 def to(matcher = nil, = nil, &block) handle_positive_matcher(@target, matcher, , &block) end |
#to_not(matcher = nil, message = nil, &block) ⇒ Object Also known as: not_to
15 16 17 |
# File 'lib/properb/rspec/example_methods.rb', line 15 def to_not(matcher = nil, = nil, &block) handle_negative_matcher(@target, matcher, , &block) end |