rspec-given 2.1.0 → 2.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.
- data/README.md +1 -1
- data/lib/rspec/given/extensions.rb +10 -2
- data/lib/rspec/given/version.rb +1 -1
- metadata +4 -7
data/README.md
CHANGED
@@ -9,12 +9,20 @@ module RSpec
|
|
9
9
|
# implementation-specific.
|
10
10
|
module InstanceExtensions # :nodoc:
|
11
11
|
|
12
|
+
# List of containing contexts in order from outermost to
|
13
|
+
# innermost.
|
14
|
+
def _rg_contexts # :nodoc:
|
15
|
+
self.class.ancestors.select { |context|
|
16
|
+
context.respond_to?(:_rg_givens)
|
17
|
+
}.reverse
|
18
|
+
end
|
19
|
+
|
12
20
|
# Establish all the Given preconditions the current and
|
13
21
|
# surrounding describe/context blocks, starting with the
|
14
22
|
# outermost context.
|
15
23
|
def _rg_establish_givens # :nodoc:
|
16
24
|
return if defined?(@_rg_ran)
|
17
|
-
|
25
|
+
_rg_contexts.each do |context|
|
18
26
|
context._rg_givens.each do |block|
|
19
27
|
instance_eval(&block)
|
20
28
|
end
|
@@ -25,7 +33,7 @@ module RSpec
|
|
25
33
|
# Check all the invariants in the current and surrounding
|
26
34
|
# describe/context blocks, starting with the outermost context.
|
27
35
|
def _rg_check_invariants # :nodoc:
|
28
|
-
|
36
|
+
_rg_contexts.each do |context|
|
29
37
|
context._rg_invariants.each do |block|
|
30
38
|
instance_eval(&block)
|
31
39
|
end
|
data/lib/rspec/given/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-given
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -72,9 +72,10 @@ files:
|
|
72
72
|
- Gemfile
|
73
73
|
- Gemfile.lock
|
74
74
|
- MIT-LICENSE
|
75
|
-
- Rakefile
|
76
75
|
- README.md
|
76
|
+
- Rakefile
|
77
77
|
- lib/rspec-given.rb
|
78
|
+
- lib/rspec/given.rb
|
78
79
|
- lib/rspec/given/configure.rb
|
79
80
|
- lib/rspec/given/extensions.rb
|
80
81
|
- lib/rspec/given/failure.rb
|
@@ -84,7 +85,6 @@ files:
|
|
84
85
|
- lib/rspec/given/module_methods.rb
|
85
86
|
- lib/rspec/given/rspec1_given.rb
|
86
87
|
- lib/rspec/given/version.rb
|
87
|
-
- lib/rspec/given.rb
|
88
88
|
- examples/example_helper.rb
|
89
89
|
- examples/integration/and_spec.rb
|
90
90
|
- examples/integration/focused_line_spec.rb
|
@@ -112,9 +112,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
112
|
- - ! '>='
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
|
-
segments:
|
116
|
-
- 0
|
117
|
-
hash: -836562108368916480
|
118
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
116
|
none: false
|
120
117
|
requirements:
|