Module: CapybaraWatcher

Defined in:
lib/capybara_watcher.rb,
lib/capybara_watcher/configuration.rb

Defined Under Namespace

Modules: Configuration

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure {|Configuration.options| ... } ⇒ Object

Yields:



4
5
6
# File 'lib/capybara_watcher.rb', line 4

def self.configure
  yield Configuration.options
end

Instance Method Details

#before_wait(repeat = 1) ⇒ Object



17
18
19
20
# File 'lib/capybara_watcher.rb', line 17

def before_wait(repeat = 1)
  yield
  begin_to_watch(body, repeat)
end

#looped?Boolean

Returns:

  • (Boolean)


8
9
10
11
# File 'lib/capybara_watcher.rb', line 8

def looped?
  # define N seconds to let test continue.
  @seconds >= Configuration.options[:timeout]
end

#wait_for_changes(repeat = 1) ⇒ Object



13
14
15
# File 'lib/capybara_watcher.rb', line 13

def wait_for_changes(repeat = 1)
  begin_to_watch(body, repeat)
end