lacomartincik-rspactor 0.3.3.1 → 0.3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rspactor/runner.rb +2 -4
- data/lib/rspactor/test_inspector.rb +2 -2
- data/spec/runner_spec.rb +1 -1
- metadata +1 -1
data/lib/rspactor/runner.rb
CHANGED
@@ -57,11 +57,9 @@ module RSpactor
|
|
57
57
|
patterns = ["test/unit/**/*_test.rb", "test/lib/**/*_test.rb",
|
58
58
|
"test/functional/**/*_test.rb", "test/integration/**/*_test.rb"]
|
59
59
|
|
60
|
-
file_list = []
|
61
60
|
patterns.each do |pattern|
|
62
|
-
|
61
|
+
run_test_command(Dir[pattern])
|
63
62
|
end
|
64
|
-
run_test_command(file_list)
|
65
63
|
end
|
66
64
|
end
|
67
65
|
|
@@ -145,7 +143,7 @@ module RSpactor
|
|
145
143
|
end
|
146
144
|
|
147
145
|
def test_runner
|
148
|
-
|
146
|
+
"ruby -e 'ARGV.each{|f| load f}'"
|
149
147
|
end
|
150
148
|
|
151
149
|
def ruby_opts
|
@@ -51,9 +51,9 @@ module RSpactor
|
|
51
51
|
when %r:^lib/:
|
52
52
|
candidates << test_file
|
53
53
|
# lib/foo/bar_test.rb -> lib/bar_test.rb
|
54
|
-
candidates << candidates.last.sub($&, '')
|
54
|
+
#candidates << candidates.last.sub($&, '')
|
55
55
|
# lib/bar_test.rb -> bar_test.rb
|
56
|
-
candidates << candidates.last.sub(%r:\w+/:, '') if candidates.last.index('/')
|
56
|
+
#candidates << candidates.last.sub(%r:\w+/:, '') if candidates.last.index('/')
|
57
57
|
when 'config/routes.rb'
|
58
58
|
candidates << 'controllers' << 'helpers' << 'views'
|
59
59
|
when 'config/database.yml', 'db/schema.rb'
|
data/spec/runner_spec.rb
CHANGED
@@ -81,7 +81,7 @@ describe RSpactor::Runner do
|
|
81
81
|
|
82
82
|
it "should run all specs if Interactor isn't interrupted" do
|
83
83
|
@interactor.should_receive(:wait_for_enter_key).and_return(nil)
|
84
|
-
@runner.should_receive(:run_test_command).with([])
|
84
|
+
@runner.should_receive(:run_test_command).at_least(1).times.with([])
|
85
85
|
setup
|
86
86
|
end
|
87
87
|
|