Skip to content

Commit

Permalink
chore: Enable warnings when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrove committed Apr 8, 2018
1 parent 4edf427 commit 665c6c1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ Bundler::GemHelper.install_tasks

Rake::TestTask.new
task :default => [:test]
task :test => :set_rubyopts

task :set_rubyopts do
ENV['RUBYOPT'] ||= ""
ENV['RUBYOPT'] += " -w"

task :test => :set_frozen_string_literal_option
task :set_frozen_string_literal_option do
if RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.3"
warn "NOTE: Testing support for frozen string literals"
ENV['RUBYOPT'] ||= ""
ENV['RUBYOPT'] += " --enable-frozen-string-literal --debug=frozen-string-literal"
end
end
Expand Down

0 comments on commit 665c6c1

Please sign in to comment.