Module: Capybara::RSpecMatcherProxies

Defined in:
lib/capybara/rspec/matcher_proxies.rb

Instance Method Summary collapse

Instance Method Details

#all(*args, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/capybara/rspec/matcher_proxies.rb', line 5

def all(*args, &block)
  if defined?(::RSpec::Matchers::BuiltIn::All) && args.first.respond_to?(:matches?)
    ::RSpec::Matchers::BuiltIn::All.new(*args)
  else
    find_all(*args, &block)
  end
end

#within(*args) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/capybara/rspec/matcher_proxies.rb', line 13

def within(*args)
  if block_given?
    within_element(*args, &Proc.new)
  else
    be_within(*args)
  end
end