Module: Hermes::Scopes

Included in:
IntegrationCase
Defined in:
lib/hermes/scopes.rb

Instance Method Summary collapse

Instance Method Details



15
16
17
# File 'lib/hermes/scopes.rb', line 15

def click_link_within(scope, link)
  within(scope) { click_link(link) }
end

#within(*args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/hermes/scopes.rb', line 3

def within(*args)
  object = args[0]
  prefix = args[1]

  scope = if object.is_a?(ActiveRecord::Base)
    ['#' + ActionController::RecordIdentifier.dom_id(object, prefix)]
  else
    args
  end
  super(*scope)
end