Skip to content

Commit 912daa9

Browse files
committed
Merge pull request #1619 from bf4/allow_devs_to_opt_out_of_warnings
Allow devs to opt out of test warnings
2 parents 61412d8 + 39623e8 commit 912daa9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ Rake::TestTask.new do |t|
4343
t.libs << 'test'
4444
t.libs << 'lib'
4545
t.test_files = FileList['test/**/*_test.rb']
46-
t.ruby_opts = ['-w -r./test/test_helper.rb']
46+
t.ruby_opts = ['-r./test/test_helper.rb']
47+
t.ruby_opts << ' -w' unless ENV['NO_WARN'] == 'true'
4748
t.verbose = true
4849
end
4950

test/action_controller/serialization_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def use_adapter?
454454
end
455455

456456
def test_render_event_is_emmited
457-
ActiveSupport::Notifications.subscribe('render.active_model_serializers') do |name|
457+
::ActiveSupport::Notifications.subscribe('render.active_model_serializers') do |name|
458458
@name = name
459459
end
460460

test/active_model_serializers/adapter_for_test.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
require 'test_helper'
2+
13
module ActiveModelSerializers
2-
class AdapterForTest < ActiveSupport::TestCase
4+
class AdapterForTest < ::ActiveSupport::TestCase
35
UnknownAdapterError = ::ActiveModelSerializers::Adapter::UnknownAdapterError
46

57
def test_serializer_adapter_returns_configured_adapter

0 commit comments

Comments
 (0)