r_spec 0.1.1 → 0.2.0

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
  SHA1:
3
- metadata.gz: 2c3049c4ebd9625b0f68cbac8aebbaeeeae6aea4
4
- data.tar.gz: 4ed229f6b7af9fb724b4b8a84b7e669d75f6f76c
3
+ metadata.gz: 8950ebeb7e88526f836143ac5a500834ff3cc75d
4
+ data.tar.gz: 2a9e7ec9ceee6ae3077503415758e184c10128e1
5
5
  SHA512:
6
- metadata.gz: e1b94c8ae19261cbeb6cb4e5aed30d06c3a62fb20ab3dadb1ed941ef2a57b39a39f32988517a70ccd476a402dbf549ac00a0ae95c25551dd96978d6cd6be6619
7
- data.tar.gz: b6f9c72508f69af188bc480c6c42cd549019648e708d9acd6c4ba586ba38631d647610b682c0be1ddd2004c4917b8c229230ecdfee25d0c00e73ea7b28068f87
6
+ metadata.gz: 8edf8760b374bf3f1ab3fdc8a8ab4f8c16e13c8853f57b158a47ce3af4098f4a89c15be1f8505bf352461cfd0764b174d7a0fffddb3f13a36a95903ddb220cdf
7
+ data.tar.gz: 9f1087e9d92a22e293f59d6e23f0c98028508ef12f887fe0b8ba19d25bf02136644285a6f0005952b862fa306b6f8a81ef804135993d9667ec371051b65043a8
checksums.yaml.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  :warning: Important:
13
13
 
14
- To avoid confusion in the community, please note that the gem of this project is **not [rspec](https://rubygems.org/gems/rspec)**, it is **[r_spec](https://rubygems.org/gems/rspec)** (meaning _Ruby Spec_).
14
+ To avoid confusion in the community, please note that the gem of this project is **not [rspec](https://rubygems.org/gems/rspec)**, it is **[r_spec](https://rubygems.org/gems/r_spec)** (meaning _Ruby Spec_).
15
15
 
16
16
  This project is totally independent of [rspec.info](http://rspec.info/).
17
17
 
data/VERSION.semver CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
@@ -0,0 +1 @@
1
+ 541eb96ff91798d807dc5b0bd71dab3e5c17358bc0e5bca8784607b8de0c8e9532011e958e152fb4a22bc653d9af13bd5edaf0989ff77c7941004f03ad0f29be
data/lib/fix/on.rb ADDED
@@ -0,0 +1,43 @@
1
+ # Namespace for the Fix framework.
2
+ module Fix
3
+ # Override Fix's On class.
4
+ class On
5
+ # Useful to perform side-effects, e.g., add something in to a database.
6
+ #
7
+ # @note To declare an instance variable, use the `let` helper instead.
8
+ #
9
+ # @param block [Proc] The block to call.
10
+ #
11
+ # @return [#object_id] The given block.
12
+ def before(*, &block)
13
+ block.call
14
+ end
15
+
16
+ # @param another_front_object [#object_id] Override the front object.
17
+ # @param specs [Proc] A set of specs.
18
+ #
19
+ # @return [Array] List of results.
20
+ def describe(another_front_object, *, &specs)
21
+ o = On.new(another_front_object,
22
+ results,
23
+ challenges,
24
+ helpers.dup,
25
+ configuration)
26
+
27
+ o.instance_eval(&specs)
28
+ end
29
+
30
+ # Override the implicit subject.
31
+ #
32
+ # @param block [Proc, nil] Another subject inside a block.
33
+ #
34
+ # @return [#object_id] The subject.
35
+ def subject(&block)
36
+ if block_given?
37
+ @described = block.call
38
+ else
39
+ super
40
+ end
41
+ end
42
+ end
43
+ end
data/lib/r_spec.rb CHANGED
@@ -27,6 +27,5 @@ module RSpec
27
27
  end
28
28
  end
29
29
 
30
- require_relative File.join 'fix', 'before'
31
- require_relative File.join 'fix', 'describe'
32
30
  require_relative File.join 'fix', 'it'
31
+ require_relative File.join 'fix', 'on'
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
@@ -178,9 +178,9 @@ files:
178
178
  - bin/setup
179
179
  - certs/gem-cyril-public_cert.pem
180
180
  - checksum/r_spec-0.1.0.gem.sha512
181
- - lib/fix/before.rb
182
- - lib/fix/describe.rb
181
+ - checksum/r_spec-0.1.1.gem.sha512
183
182
  - lib/fix/it.rb
183
+ - lib/fix/on.rb
184
184
  - lib/r_spec.rb
185
185
  - pkg_checksum
186
186
  - r_spec.gemspec
metadata.gz.sig CHANGED
Binary file
data/lib/fix/before.rb DELETED
@@ -1,16 +0,0 @@
1
- # Namespace for the Fix framework.
2
- module Fix
3
- # Override Fix's On class.
4
- class On
5
- # Useful to perform side-effects, e.g., add something in to a database.
6
- #
7
- # @note To declare an instance variable, use the `let` helper instead.
8
- #
9
- # @param block [Proc] The block to call.
10
- #
11
- # @return [#object_id] The given block.
12
- def before(*, &block)
13
- block.call
14
- end
15
- end
16
- end
data/lib/fix/describe.rb DELETED
@@ -1,19 +0,0 @@
1
- # Namespace for the Fix framework.
2
- module Fix
3
- # Override Fix's On class.
4
- class On
5
- # @param another_front_object [#object_id] Override the front object.
6
- # @param specs [Proc] A set of specs.
7
- #
8
- # @return [Array] List of results.
9
- def describe(another_front_object, *, &specs)
10
- o = On.new(another_front_object,
11
- results,
12
- challenges,
13
- helpers.dup,
14
- configuration)
15
-
16
- o.instance_eval(&specs)
17
- end
18
- end
19
- end