module Aygabtu::RSpec::ExampleGroupMethods

Attributes

aygabtu_scope[W]

Public Instance Methods

aygabtu_action(action, scope, *args) click to toggle source
# File lib/aygabtu/rspec.rb, line 31
def aygabtu_action(action, scope, *args)
  puts "Action #{action} after checkpoint #{aygabtu_handle.checkpoint} from #{PointOfCall.point_of_call}" if aygabtu_handle.verbose?
  ScopeActor.new(scope, self).public_send(action, *args)
end
aygabtu_enter_context(block, scope) click to toggle source
# File lib/aygabtu/rspec.rb, line 24
def aygabtu_enter_context(block, scope)
  context "Context defined at #{PointOfCall.point_of_call}" do
    self.aygabtu_scope = scope
    class_exec(&block)
  end
end
aygabtu_handle() click to toggle source
# File lib/aygabtu/rspec.rb, line 36
def aygabtu_handle
  if superclass.respond_to?(:aygabtu_handle)
    superclass.aygabtu_handle
  else
    @_aygabtu_handle ||= Handle.new
  end
end
aygabtu_matching_routes(scope = aygabtu_scope) click to toggle source
# File lib/aygabtu/rspec.rb, line 44
def aygabtu_matching_routes(scope = aygabtu_scope)
  scope = scope.scope if scope.respond_to?(:scope) # a scope chain can be pased as well
  aygabtu_handle.routes.select { |route|
    scope.matches_route?(route) && aygabtu_select_route?(route.journey_route)
  }
end
aygabtu_scope() click to toggle source
# File lib/aygabtu/rspec.rb, line 12
def aygabtu_scope
  @aygabtu_scope ||= if superclass.respond_to?(:aygabtu_scope)
    superclass.aygabtu_scope
  else
    Scope::Base.blank_slate
  end
end
aygabtu_scope_chain() click to toggle source
# File lib/aygabtu/rspec.rb, line 20
def aygabtu_scope_chain
  @aygabtu_scope_chain ||= ScopeChain.new(self, aygabtu_scope)
end
aygabtu_select_route?(journey_route) click to toggle source
# File lib/aygabtu/rspec.rb, line 51
def aygabtu_select_route?(journey_route)
  true
end