rspec-become-matcher 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +4 -4
- data/Gemfile.lock +2 -1
- data/README.md +2 -2
- data/lib/rspec/become_matcher/version.rb +1 -1
- data/lib/rspec/become_matcher.rb +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69629e5bc1f8afc5ff70407efe6bf1a23aa17b6102c62a197a26c5230aa5a0b1
|
4
|
+
data.tar.gz: 4a317a927587679c1a6454c3bc6d45adf698d80390da9b1e989e52c062e032d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c13368f5a207ca79d0699ab526cf25e733925d5a7d51b7de91ac47d8aa29ad02065dc650ebc8ad99b75e9bfb45c62d7da43ce9f1571daf095273d2c5fb7067e
|
7
|
+
data.tar.gz: 01f17c425c4d9370a2664ce7ff8a71b19c8750f2973b2e7f596af6250bbcf45e92e7484f725e79b6bf2aefb36a49564621caf4e451a129c7a804492812258b36
|
data/.github/workflows/ci.yml
CHANGED
@@ -2,14 +2,14 @@ on: [push]
|
|
2
2
|
|
3
3
|
jobs:
|
4
4
|
build:
|
5
|
-
runs-on: ubuntu-
|
5
|
+
runs-on: ubuntu-latest
|
6
6
|
strategy:
|
7
7
|
matrix:
|
8
|
-
ruby: ["
|
8
|
+
ruby: ["3.1", "3.2", "3.3"]
|
9
9
|
name: Ruby ${{ matrix.ruby }} sample
|
10
10
|
steps:
|
11
|
-
- uses: actions/checkout@
|
12
|
-
- uses:
|
11
|
+
- uses: actions/checkout@v4
|
12
|
+
- uses: ruby/setup-ruby@v1
|
13
13
|
with:
|
14
14
|
ruby-version: ${{ matrix.ruby }}
|
15
15
|
- run: |
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Rspec::BecomeMatcher [![Build Status](https://
|
1
|
+
# Rspec::BecomeMatcher [![Build Status](https://github.com/fujimura/rspec-become-matcher/actions/workflows/ci.yml/badge.svg)](https://github.com/fujimura/rspec-become-matcher/actions/workflows/ci.yml)
|
2
2
|
|
3
3
|
RSpec matcher to check that an expression changed its result within arbitrary seconds.
|
4
4
|
|
@@ -7,7 +7,6 @@ async_task.start!
|
|
7
7
|
expect { async_task.finished? }.to become(true)
|
8
8
|
```
|
9
9
|
|
10
|
-
|
11
10
|
## Installation
|
12
11
|
|
13
12
|
Add this line to your application's Gemfile:
|
@@ -27,6 +26,7 @@ Or install it yourself as:
|
|
27
26
|
## Usage
|
28
27
|
|
29
28
|
Require and include matcher first:
|
29
|
+
|
30
30
|
```ruby
|
31
31
|
require 'rspec/become_matcher'
|
32
32
|
|
data/lib/rspec/become_matcher.rb
CHANGED
@@ -33,11 +33,16 @@ module RSpec
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
def
|
36
|
+
def within(limit)
|
37
37
|
@limit = limit
|
38
38
|
self
|
39
39
|
end
|
40
40
|
|
41
|
+
def in(limit)
|
42
|
+
warn "[DEPRECATION] `in` is deprecated. Please use `within` instead."
|
43
|
+
within(limit)
|
44
|
+
end
|
45
|
+
|
41
46
|
def failure_message
|
42
47
|
<<~MESSAGE
|
43
48
|
Expected #{was} to become #{expected || 'given block'} in #{limit.to_i} second, but not
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-become-matcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daisuke Fujimura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-expectations
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.5.15
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: RSpec matcher to check that an expression changed its result in arbitrary
|