assert exactly x times
This commit is contained in:
parent
77ecafa978
commit
15d0b63b45
|
@ -29,7 +29,7 @@ describe GitHubChangelogGenerator::OctoFetcher do
|
|||
context "when raises Octokit::Forbidden" do
|
||||
it "sleeps and retries and then aborts" do
|
||||
retry_limit = GitHubChangelogGenerator::OctoFetcher::MAX_FORBIDDEN_RETRIES - 1
|
||||
allow(fetcher).to receive(:sleep_base_interval).and_return(0)
|
||||
allow(fetcher).to receive(:sleep_base_interval).exactly(retry_limit).times.and_return(0)
|
||||
|
||||
expect(fetcher).to receive(:sys_abort).with("Exceeded retry limit")
|
||||
fetcher.send(:check_github_response) { raise(Octokit::Forbidden) }
|
||||
|
|
Loading…
Reference in New Issue
Block a user