Project

soon

0.0
No commit activity in last 3 years
No release in over 3 years
Retries a block until it does not raise with a timeout
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 10.0
~> 3.0
 Project Readme

soon

$ gem install soon
it "eventually creates 3 instances" do
  HardWorker.perform_async something: true
  soon do
    expect(Hard.count).to eq 3
  end
end

it "does it sooner than the default 1s" do
  HardWorker.perform_async something: true
  soon 0.1 do
    expect(Hard.count).to eq 3
  end
end

it "tries do do it every 2 seconds for the next two minutes" do
  HardWorker.perform_async something: true
  soon 120, interval: 2 do
    expect(Hard.count).to eq 3
  end
end