Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use ruby -w by default #69

Open
wants to merge 1 commit into from

4 participants

@hgmnz

No description provided.

@jimweirich
Owner

Won't change this in a minor release. Will consider it for the next major release.

@jimweirich
Owner

Although I'm in favor of this change in principle, I've decided not to include it in the 0.9.3/10.0.0 changes. If I dropped it in without warning, every single rails application ever will start spewing errors.

We need to work out a more gentle introduction of this change (e.g. explore deprecation options, get the rails guys to explicitly set the warning option, etc.).

@drbrain drbrain modified the milestone: Future, Rake 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 25, 2011
  1. Use ruby warnings by default

    Harold Giménez authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 5 deletions.
  1. +1 −1  lib/rake/testtask.rb
  2. +6 −4 test/test_rake_test_task.rb
View
2  lib/rake/testtask.rb
@@ -83,7 +83,7 @@ def initialize(name=:test)
@options = nil
@test_files = nil
@verbose = false
- @warning = false
+ @warning = true
@loader = :rake
@ruby_opts = []
yield self if block_given?
View
10 test/test_rake_test_task.rb
@@ -11,6 +11,7 @@ def test_initialize
assert_equal ['lib'], tt.libs
assert_equal 'test/test*.rb', tt.pattern
assert_equal false, tt.verbose
+ assert_equal true, tt.warning
assert Task.task_defined?(:test)
end
@@ -18,13 +19,13 @@ def test_initialize_override
tt = Rake::TestTask.new(:example) do |t|
t.libs = ['src', 'ext']
t.pattern = 'test/tc_*.rb'
- t.verbose = true
+ t.verbose = false
end
refute_nil tt
assert_equal :example, tt.name
assert_equal ['src', 'ext'], tt.libs
assert_equal 'test/tc_*.rb', tt.pattern
- assert_equal true, tt.verbose
+ assert_equal false, tt.verbose
assert Task.task_defined?(:example)
end
@@ -46,12 +47,13 @@ def test_libs_equals
path = %w[lib A B].join File::PATH_SEPARATOR
- assert_equal "-I\"#{path}\"", test_task.ruby_opts_string
+ assert_equal "-w -I\"#{path}\"", test_task.ruby_opts_string
end
def test_libs_equals_empty
test_task = Rake::TestTask.new do |t|
- t.libs = []
+ t.libs = []
+ t.warning = false
end
assert_equal '', test_task.ruby_opts_string
Something went wrong with that request. Please try again.