Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestTask verbose #67

Merged
merged 2 commits into from
Feb 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/rake/testtask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def ruby_opts_string # :nodoc:
opts = @ruby_opts.dup
opts.unshift("-I\"#{lib_path}\"") unless @libs.empty?
opts.unshift("-w") if @warning
opts.unshift('--verbose') if @verbose
opts.join(" ")
end

Expand Down
6 changes: 5 additions & 1 deletion test/test_rake_test_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def test_initialize
assert_equal :test, tt.name
assert_equal ['lib'], tt.libs
assert_equal 'test/test*.rb', tt.pattern
assert_equal false, tt.warning
assert_equal false, tt.verbose
assert Task.task_defined?(:test)
end
Expand All @@ -19,14 +20,18 @@ def test_initialize_override
t.description = "Run example tests"
t.libs = ['src', 'ext']
t.pattern = 'test/tc_*.rb'
t.warning = true
t.verbose = true
end
refute_nil tt
assert_equal "Run example tests", tt.description
assert_equal :example, tt.name
assert_equal ['src', 'ext'], tt.libs
assert_equal 'test/tc_*.rb', tt.pattern
assert_equal true, tt.warning
assert_equal true, tt.verbose
assert_match(/-w/, tt.ruby_opts_string)
assert_match(/--verbose/, tt.ruby_opts_string)
assert Task.task_defined?(:example)
end

Expand Down Expand Up @@ -142,5 +147,4 @@ def test_test_files_equals

assert_equal ["a.rb", 'b.rb'], tt.file_list.to_a
end

end