rspec-wait
rspec-wait copied to clipboard
Wait for conditions in RSpec
I have an RSpec test set up as follows: ```ruby require 'rspec/wait' describe Commander do let(:logger) { SpecLogger.new(:info) } subject do commander = Commander.new commander.logger = logger commander end describe...
sometimes it's necessary to execute the same command a few times in a row (like elasticsearch) to get to the desired state. For a simple example let's take: expect {...
I had to add ``` require "rspec/wait" ``` To my `spec_helper.rb` May be nice to include in the README
Fixes: #20 Some notes on the rootcause and solution: `contain_exactly` is one of those matchers that stores some intermediate computations internally. And hence we reuse this matcher object throughout the...
In order to reproduce this you need to: 1. wait for a block... 2. ... yielding an array of values of different types ... 3. ... to `contain_exactly` correct values...
- consequence: long-running blocks are not interrupted - 7 tests fail, expecting TimeoutError but getting ExpectationNotMetError Note: **I have not patched up the failing tests** Rationale for this: https://jvns.ca/blog/2015/11/27/why-rubys-timeout-is-dangerous-and-thread-dot-raise-is-terrifying/ >...
I'm not sure if this is helpful, but some folks in #ruby on freenode IRC were noticing that, with rspec-wait, `Timeout.timeout` was failing to raise Timeout::Error in a timely manner...
## ⚠️ 🚧 Work in Progress Related to #20. The first commit adds red tests. Please fork and continue your branch off of this `block-matchers` branch in an attempt to...
Hi, I'm trying to wait for a system to leave an error state, but the system always raises exceptions, to try and wait for it i ended up using a...