Class: Behavior

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/rails/extra/routing/hyper_shortcut/behavior.rb

Instance Method Summary collapse

Constructor Details

#initialize(should_or_not, matcher_placeholder) ⇒ Behavior

Returns a new instance of Behavior.



2
3
4
5
# File 'lib/rspec/rails/extra/routing/hyper_shortcut/behavior.rb', line 2

def initialize(should_or_not,matcher_placeholder)
  @should_or_not = should_or_not
  @matcher_placeholder = matcher_placeholder
end

Instance Method Details

#block_to_test(subject) ⇒ Object



7
8
9
# File 'lib/rspec/rails/extra/routing/hyper_shortcut/behavior.rb', line 7

def block_to_test(subject)
  block_that subject, @should_or_not, @matcher_placeholder
end