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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/fix/context.rb +13 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d55ef5f2323d4329f5b62fa981130fc4027f72a44aedb4cedc1d60a8f6482a8c
4
- data.tar.gz: 4f19f7567567c70f180a1cc3cfbcbad8f907dd16154a815d1395b1fb22a3c18d
3
+ metadata.gz: 6245525d719965043d4187cbcce446e21c2b946303048159a13cc37161851ada
4
+ data.tar.gz: c5b10da14f591df283e832f15f4839b420ecfbcbca4af6ed2974b28c20815d15
5
5
  SHA512:
6
- metadata.gz: e14033e214c24666156eed3c3c4f29699bb40c4f6404dd1ab1b8c50b626d3db36ae7986cb29cba180ca0aaac1d80f677b6750693870e9932dbe98c51e01964d9
7
- data.tar.gz: bf125f159f6f672f3d799c3c67631949d724d71cbd06137644158ac83d54cb9f9957b5e98f9f6676ab7a1381e0f5e74b773fde659bffe7e95a18d150ea9827a4
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.beta3'
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
- ## Usage
28
+ ## Example
29
29
 
30
30
  Given this app:
31
31
 
@@ -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.beta3
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-15 00:00:00.000000000 Z
11
+ date: 2020-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: defi