Class: Properb::RSpec::ExampleMethods::Assumption

Inherits:
Object
  • Object
show all
Defined in:
lib/properb/rspec/example_methods.rb

Instance Method Summary collapse

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, message = nil, &block)
  handle_positive_matcher(@target, matcher, message, &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, message = nil, &block)
  handle_negative_matcher(@target, matcher, message, &block)
end