fix 1.0.0.beta3 → 1.0.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/fix/context.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6245525d719965043d4187cbcce446e21c2b946303048159a13cc37161851ada
|
4
|
+
data.tar.gz: c5b10da14f591df283e832f15f4839b420ecfbcbca4af6ed2974b28c20815d15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba29c713607b3cfe280c7eb82e9eee07adc69b8d0c58c0ab9cf54117befc5a0f35c76c32d93cd0e5c4bf911a5c09786109ecc336d4866ada3e7d79f0296551b
|
7
|
+
data.tar.gz: 6267c5c89cd4a6cf4a7573bb4866e4855ed10a403cd2cb606fbe9a18f6ff3f3206559e01f8c349f0ca82d6b8a60fed13546dce80744b0967ca9ac3aeda2d381b
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
Add this line to your application's Gemfile:
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
gem 'fix', '>= 1.0.0.
|
17
|
+
gem 'fix', '>= 1.0.0.beta4'
|
18
18
|
```
|
19
19
|
|
20
20
|
And then execute:
|
@@ -25,7 +25,7 @@ Or install it yourself as:
|
|
25
25
|
|
26
26
|
$ gem install fix --pre
|
27
27
|
|
28
|
-
##
|
28
|
+
## Example
|
29
29
|
|
30
30
|
Given this app:
|
31
31
|
|
data/lib/fix/context.rb
CHANGED
@@ -109,6 +109,19 @@ module Fix
|
|
109
109
|
raise ExpectationResultNotFoundError, result.class.inspect unless result.is_a?(::Spectus::Result::Common)
|
110
110
|
end
|
111
111
|
|
112
|
+
def its(name, *args, **options, &block)
|
113
|
+
if callable.raised?
|
114
|
+
actual = callable
|
115
|
+
challenge = ::Defi.send(:call)
|
116
|
+
else
|
117
|
+
actual = callable.object
|
118
|
+
challenge = ::Defi.send(name, *args, **options)
|
119
|
+
end
|
120
|
+
|
121
|
+
o = Context.new(actual, challenge, @before_hooks.length, *@before_hooks + @after_hooks, **@lets)
|
122
|
+
o.it(&block)
|
123
|
+
end
|
124
|
+
|
112
125
|
def on(name, *args, **options, &block)
|
113
126
|
if callable.raised?
|
114
127
|
actual = callable
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: defi
|