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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4f244299f4e6b28f593a335f19193fc98d06e981292f37aa758b06508eaeb7e
|
4
|
+
data.tar.gz: 560df1bb3fcf7b61bf5eac9798416414548cb769692ccf962fe7e8d1669e27cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|