Skip to content

Commit

Permalink
Give v0-to-v1 upgrade guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
laserlemon committed Apr 26, 2024
1 parent 021e5d1 commit 0862654
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ environment:
require "rspec/wait"
```

### Upgrading from v0

RSpec::Wait v1 is very similar in syntax to v0 but does have a few breaking
changes that you should be aware of when upgrading from any 0.x version:

1. RSpec::Wait v1 requires Ruby 3.0 or greater and RSpec 3.4 or greater.
2. The `wait_for` and `wait.for` methods no longer accept arguments, only
blocks.
3. RSpec::Wait no longer uses Ruby's problematic `Timeout.timeout` method,
which means it will no longer raise a `RSpec::Wait::TimeoutError`.
RSpec::Wait v1 never interrupts the block given to `wait_for` mid-call
so make every effort to reasonably limit the block's individual call time.

## Configuration

RSpec::Wait has three available configuration values:
Expand Down

0 comments on commit 0862654

Please sign in to comment.