Module: RSpec::Repeat
- Defined in:
- lib/rspec/repeat.rb,
lib/rspec/repeat/version.rb
Overview
Allows you to repeat RSpec examples.
Defined Under Namespace
Classes: Repeater
Constant Summary collapse
- VERSION =
"1.0.2"
Instance Method Summary collapse
-
#repeat(ex, count, options = {}) ⇒ Object
Retries an example.
Instance Method Details
#repeat(ex, count, options = {}) ⇒ Object
Retries an example.
include Rspec::Repeat
around do |example|
repeat example, 3
end
Available options:
-
wait- seconds to wait between each retry -
verbose- print messages if true -
exceptions- if given, only retry exceptions from this list -
clear_let- when false, don’t clearlet‘s
21 22 23 |
# File 'lib/rspec/repeat.rb', line 21 def repeat(ex, count, = {}) Repeater.new(count, ).run(ex, self) end |