stendhal 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/features/cli.feature +33 -0
- data/lib/stendhal/autorun.rb +8 -1
- data/lib/stendhal/version.rb +1 -1
- data/spec/spec_helper.rb +13 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/features/cli.feature
CHANGED
@@ -36,6 +36,39 @@ Feature: Command line interpreter
|
|
36
36
|
Then the exit status should be 0
|
37
37
|
And the output should contain "3 examples, 0 failures"
|
38
38
|
|
39
|
+
Scenario: with a directory
|
40
|
+
Given a directory named "stendhal_project"
|
41
|
+
And I cd to "stendhal_project"
|
42
|
+
And a directory named "spec"
|
43
|
+
And a directory named "spec/nested"
|
44
|
+
Given a file named "spec/sample_spec.rb" with:
|
45
|
+
"""
|
46
|
+
describe "something" do
|
47
|
+
it "does something" do
|
48
|
+
# put your code here
|
49
|
+
end
|
50
|
+
end
|
51
|
+
"""
|
52
|
+
And a file named "spec/another_sample_spec.rb" with:
|
53
|
+
"""
|
54
|
+
describe "something" do
|
55
|
+
it "does something" do
|
56
|
+
# put your code here
|
57
|
+
end
|
58
|
+
end
|
59
|
+
"""
|
60
|
+
And a file named "spec/nested/a_nested_spec.rb" with:
|
61
|
+
"""
|
62
|
+
describe "something" do
|
63
|
+
it "does something" do
|
64
|
+
# put your code here
|
65
|
+
end
|
66
|
+
end
|
67
|
+
"""
|
68
|
+
When I run "stendhal spec"
|
69
|
+
And the output should contain "3 examples, 0 failures"
|
70
|
+
Then the exit status should be 0
|
71
|
+
|
39
72
|
Scenario: specifying files to be run
|
40
73
|
Given a directory named "stendhal_project"
|
41
74
|
And I cd to "stendhal_project"
|
data/lib/stendhal/autorun.rb
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
|
2
|
+
|
2
3
|
|
3
4
|
unless ARGV.empty?
|
4
5
|
ARGV.each do |file|
|
5
|
-
|
6
|
+
if Dir["#{file}/*"].empty?
|
7
|
+
require File.join('.',file)
|
8
|
+
else
|
9
|
+
Dir["#{file}/**/*_spec.rb"].entries.each do |entry|
|
10
|
+
require File.join('.', entry)
|
11
|
+
end
|
12
|
+
end
|
6
13
|
end
|
7
14
|
else
|
8
15
|
Dir['spec/**/*_spec.rb'].entries.each do |entry|
|
data/lib/stendhal/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,19 @@ require 'rubygems'
|
|
5
5
|
|
6
6
|
require 'simplecov'
|
7
7
|
SimpleCov.start do
|
8
|
-
add_group "
|
8
|
+
add_group "Root lib" do |src_file|
|
9
|
+
src_file.filename =~ /lib\/(\w)+\.rb$/ || (src_file.filename =~ /lib\/stendhal\/(\w)+\.rb$/ && !(src_file.filename =~ /matchers|mocks/))
|
10
|
+
end
|
11
|
+
add_group "Matchers" do |src_file|
|
12
|
+
src_file.filename =~ /lib\/stendhal\/matchers\.rb/ || src_file.filename =~ /lib\/stendhal\/matchers\/(\w)+\.rb$/
|
13
|
+
end
|
14
|
+
add_group "Mocks" do |src_file|
|
15
|
+
src_file.filename =~ /lib\/stendhal\/mocks\.rb/ || src_file.filename =~ /lib\/stendhal\/mocks\/(\w)+\.rb$/
|
16
|
+
end
|
17
|
+
add_group "Core extensions" do |src_file|
|
18
|
+
src_file.filename =~ /lib\/stendhal\/core_ext\/(\w)+\.rb$/
|
19
|
+
end
|
20
|
+
add_filter '/spec/'
|
9
21
|
end
|
10
22
|
|
11
23
|
require 'stendhal'
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 9
|
9
|
+
version: 0.1.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Josep M. Bach
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-11-
|
17
|
+
date: 2010-11-15 00:00:00 +01:00
|
18
18
|
default_executable: stendhal
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|