ex_aequo_rspex 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54096a51f4b75569e50441df345d0fd0d91820cf2987e9cc65090c32510fdc47
4
- data.tar.gz: b9221e4c561b2ae5e210a60d0ad64cff50baabf7765fc1d80aa058fcdca4e382
3
+ metadata.gz: b4f244299f4e6b28f593a335f19193fc98d06e981292f37aa758b06508eaeb7e
4
+ data.tar.gz: 560df1bb3fcf7b61bf5eac9798416414548cb769692ccf962fe7e8d1669e27cd
5
5
  SHA512:
6
- metadata.gz: 25cb1e89fb5b3262de3efc24cf55d471eb230feb80d7cd239404aca93417cce7734c3a965d0f89bff74b89a56db4968c3faad0ac4c5bed83555cb1c20ca0ef45
7
- data.tar.gz: d879538cbce5956d7e9a2c59fb09d4c88547a704f27345c29b0fea9688523b40c72fe4891bbcc56c9ec47c0bb3c9eb3ba7145ae4a88fb2f7ea0939a99a03c34f
6
+ metadata.gz: 18d23d34bb2cd51b424af891178543e513aa096999878df40a5bc0d2bd26035ac93f8dbf544f5ebe91e1ae1110ee8a45861fa7aa83878b0264ddc9d5d9aded86
7
+ data.tar.gz: 9cc3edef9410b1c159cd78095a4c3df2dc9358fe0cc70dc98eb53c2815f45c109edb0d231b0a0d3b858efe862febe057f184d6143fe3e06c7a58944400f23420
@@ -11,11 +11,25 @@ module ExAequo
11
11
  end
12
12
  alias_method :it_equals, :it_eq
13
13
 
14
+ def it_fails_spec(message=nil, &blk)
15
+ it_raises(RSpec::Expectations::ExpectationNotMetError, message, &blk)
16
+ end
17
+
18
+ def it_has_ivar(name, value, &blk)
19
+ actual = blk ? instance_eval(&blk) : subject
20
+ expect(actual.instance_variable_get("@#{name}")).to eq(value)
21
+ end
22
+
14
23
  def it_is(predicate, *args, &blk)
15
24
  actual = blk ? instance_eval(&blk) : subject
16
25
  expect(actual).to send("be_#{predicate}", *args)
17
26
  end
18
27
 
28
+ def it_is_between(lower, higher, *args, &blk)
29
+ actual = blk ? instance_eval(&blk) : subject
30
+ expect(actual).to be_between(lower, higher)
31
+ end
32
+
19
33
  def it_is_not(predicate, *args, &blk)
20
34
  actual = blk ? instance_eval(&blk) : subject
21
35
  expect(actual).not_to send("be_#{predicate}", *args)
@@ -12,12 +12,30 @@ module ExAequo
12
12
  end
13
13
  alias_method :it_equals, :it_eq
14
14
 
15
+ def it_fails_spec(message=nil, &blk)
16
+ specify do
17
+ it_raises(RSpec::Expectations::ExpectationNotMetError, message, &blk)
18
+ end
19
+ end
20
+
21
+ def it_has_ivar(name, value, &blk)
22
+ specify do
23
+ it_has_ivar(name, value, &blk)
24
+ end
25
+ end
26
+
15
27
  def it_is(predicate, *args, &blk)
16
28
  specify do
17
29
  it_is(predicate, *args, &blk)
18
30
  end
19
31
  end
20
32
 
33
+ def it_is_between(lower, higher, *args, &blk)
34
+ specify do
35
+ it_is_between(lower, higher, *args, &blk)
36
+ end
37
+ end
38
+
21
39
  def it_is_not(predicate, *args, &blk)
22
40
  specify do
23
41
  it_is_not(predicate, *args, &blk)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module ExAequo
4
4
  module RSpex
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
8
8
  # SPDX-License-Identifier: AGPL-3.0-or-later
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ex_aequo_rspex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Dober