specjour 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.markdown +6 -0
- data/README.markdown +5 -0
- data/lib/specjour/loader.rb +12 -8
- data/lib/specjour.rb +1 -1
- metadata +3 -3
data/History.markdown
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
History
|
2
2
|
=======
|
3
3
|
|
4
|
+
0.6.2 / 2012-08-20
|
5
|
+
---------------------------
|
6
|
+
* [fixed] File location for contexts within shared examples
|
7
|
+
|
8
|
+
[Full Changelog](https://github.com/sandro/specjour/compare/v0.6.1...v0.6.2)
|
9
|
+
|
4
10
|
0.6.1 / 2012-08-13
|
5
11
|
---------------------------
|
6
12
|
* [fixed] No longer prints tests that have yet to run when interrupting the
|
data/README.markdown
CHANGED
@@ -112,6 +112,11 @@ long-running test.
|
|
112
112
|
* Cucumber 0.9+
|
113
113
|
* Rails 3
|
114
114
|
|
115
|
+
## Support
|
116
|
+
|
117
|
+
* [Github Wiki](https://github.com/sandro/specjour/wiki/)
|
118
|
+
* [Github Issues](https://github.com/sandro/specjour/issues)
|
119
|
+
|
115
120
|
## Hacking on Specjour
|
116
121
|
If you want to hack on specjour, here is how to test your changes:
|
117
122
|
|
data/lib/specjour/loader.rb
CHANGED
@@ -100,17 +100,21 @@ module Specjour
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def filtered_examples
|
103
|
-
::RSpec.world.example_groups.map do |g|
|
103
|
+
examples = ::RSpec.world.example_groups.map do |g|
|
104
104
|
g.descendants.map do |gs|
|
105
105
|
gs.examples
|
106
|
-
end.flatten.map do |e|
|
107
|
-
meta = e.metadata
|
108
|
-
if e.example_group.metadata[:shared_group_name]
|
109
|
-
meta = e.metadata[:example_group]
|
110
|
-
end
|
111
|
-
"#{meta[:file_path]}:#{meta[:line_number]}"
|
112
106
|
end
|
113
|
-
end.flatten
|
107
|
+
end.flatten
|
108
|
+
locations = examples.map do |e|
|
109
|
+
meta = e.metadata
|
110
|
+
shared_group = e.example_group.ancestors.detect do |group|
|
111
|
+
group.metadata[:shared_group_name]
|
112
|
+
end
|
113
|
+
if shared_group
|
114
|
+
meta = shared_group.metadata[:example_group]
|
115
|
+
end
|
116
|
+
meta[:location]
|
117
|
+
end.uniq
|
114
118
|
ensure
|
115
119
|
::RSpec.reset
|
116
120
|
end
|
data/lib/specjour.rb
CHANGED
@@ -29,7 +29,7 @@ module Specjour
|
|
29
29
|
autoload :Cucumber, 'specjour/cucumber'
|
30
30
|
autoload :RSpec, 'specjour/rspec'
|
31
31
|
|
32
|
-
VERSION ||= "0.6.
|
32
|
+
VERSION ||= "0.6.2"
|
33
33
|
HOOKS_PATH ||= "./.specjour/hooks.rb"
|
34
34
|
PROGRAM_NAME ||= $PROGRAM_NAME # keep a reference of the original program name
|
35
35
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specjour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
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-08-
|
12
|
+
date: 2012-08-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dnssd
|
@@ -177,7 +177,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
177
|
version: '0'
|
178
178
|
segments:
|
179
179
|
- 0
|
180
|
-
hash:
|
180
|
+
hash: -992575926036300908
|
181
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
182
|
none: false
|
183
183
|
requirements:
|