rspec_in_context 0.1.1 → 0.1.2

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: dccade70caa948b401dbafb0ff2d0d4a63aab1a3
4
- data.tar.gz: 51bc8d283dcca7fd3922422993177e0afc8e65b0
3
+ metadata.gz: 5642e59dbebb5dbff148e8ae509607566bc308da
4
+ data.tar.gz: 9be37738f258a437096c8f7d96eff8d38f26c23e
5
5
  SHA512:
6
- metadata.gz: d8333b33ec18c2a213b3a62a3c01163012e3e8e5fe7f4e3a361434298e03d93ab14c25276f7d20ef8cc1024c50932e17dc5300a1fe8fa73a997976a2eee9a51e
7
- data.tar.gz: 4313b7c1f21da79e15f8678218b6ef6ffd49ce255fc974a910f8ff36f1235dd3aecc28f5d425da501cfc42632766f387526a145439f94b64475a16af4d2433b1
6
+ metadata.gz: db08c47163993a7bfb142d3339ad4e1915f249f139216a346bf5c472466288a0fed029c624723a183053868a91720edc682d1c48acd70bce3582e9240b7e0a41
7
+ data.tar.gz: f771413d8739af72f3acbe88a2ff2ae6b75458fc6137d2f96836bf78f92f33c95df68f8bb00df9f119d7a8556023a9b6e151e02896fa6bb4fc10a44b6e38caa6
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # RspecInContext
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/rspec_in_context.svg)](https://badge.fury.io/rb/rspec_in_context)
4
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/7ee82740e840412b864574851aa44f16)](https://www.codacy.com/project/denis-pasin/rspec_in_context/dashboard?utm_source=github.com&utm_medium=referral&utm_content=denispasin/rspec_in_context&utm_campaign=Badge_Grade_Dashboard)
5
+
6
+
3
7
  This gem is here to help you write better shared_examples in Rspec.
4
8
 
5
9
  Ever been bothered by the fact that they don't really behave like methods and that you can't pass it a block ? There you go: `rspec_in_context`
@@ -58,7 +62,7 @@ end
58
62
 
59
63
  ##### Outside a Rspec block
60
64
 
61
- Outside of a test you have to use `Rspec.define_context`.
65
+ Outside of a test you have to use `RSpec.define_context`.
62
66
 
63
67
 
64
68
  ### Use the context
@@ -105,6 +109,9 @@ in_context :context_name do
105
109
  end
106
110
  ```
107
111
 
112
+ * You can add variable instantiation relative to your test where you exactly want
113
+ It's an alias of `execute_tests` so you can't use both. But it let you describe what the block will do better.
114
+
108
115
  * You can use variable in the in_context definition
109
116
 
110
117
  ```ruby
@@ -33,6 +33,7 @@ module RspecInContext
33
33
  def execute_tests
34
34
  instance_exec(&Thread.current[:test_block]) if Thread.current[:test_block]
35
35
  end
36
+ alias_method :instanciate_context, :execute_tests
36
37
 
37
38
  def define_context(context_name, &block)
38
39
  InContext.add_context(context_name, &block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RspecInContext
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_in_context
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis <Zaratan> Pasin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-20 00:00:00.000000000 Z
11
+ date: 2018-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  requirements: []
195
195
  rubyforge_project:
196
- rubygems_version: 2.6.14
196
+ rubygems_version: 2.5.2.3
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: This gem is here to help DRYing your tests cases by giving a better "shared_examples".