tdd 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.
- data/bin/tdd +6 -5
- data/lib/tdd/version.rb +1 -1
- metadata +1 -1
data/bin/tdd
CHANGED
@@ -10,13 +10,11 @@ Main {
|
|
10
10
|
|
11
11
|
description <<-__
|
12
12
|
|
13
|
-
watch files and run test
|
13
|
+
watch files and run test/unit or rspec tests when they change
|
14
14
|
__
|
15
15
|
|
16
16
|
examples <<-__
|
17
17
|
|
18
|
-
### gem install tdd
|
19
|
-
|
20
18
|
# Using with test/unit:
|
21
19
|
$ tdd test/unit/some_unit_test.rb
|
22
20
|
|
@@ -81,7 +79,6 @@ Main {
|
|
81
79
|
@paths << @test_file
|
82
80
|
end
|
83
81
|
|
84
|
-
puts @paths.inspect
|
85
82
|
test_command = 'rspec' if @test_file.match(/_spec.rb/)
|
86
83
|
test_command = 'ruby -Itest' if @test_file.match(/_test.rb/)
|
87
84
|
@command = "#{test_command} #{@test_args}"
|
@@ -105,7 +102,11 @@ Main {
|
|
105
102
|
def print_a_summary_of_watched_files
|
106
103
|
puts "## #{ @command }"
|
107
104
|
puts "#"
|
108
|
-
|
105
|
+
if @paths.length > 15
|
106
|
+
puts "Watching #{@paths.length} files"
|
107
|
+
else
|
108
|
+
puts @paths.join("\n")
|
109
|
+
end
|
109
110
|
puts
|
110
111
|
end
|
111
112
|
|
data/lib/tdd/version.rb
CHANGED