Method: RSpec::Wait.wait_for

Defined in:
lib/rspec/wait.rb

.wait_for(*args, &block) ⇒ Object

Raises:

  • (ArgumentError)


21
22
23
24
25
26
# File 'lib/rspec/wait.rb', line 21

def wait_for(*args, &block)
  raise ArgumentError, "The `wait_for` method only accepts a block." if args.any?
  raise ArgumentError, "The `wait_for` method requires a block." unless block

  Target.new(block)
end