Skip to content

Commit

Permalink
Raise error on unexpected block argument
Browse files Browse the repository at this point in the history
flash-gordon committed Jan 21, 2025
1 parent 870663a commit da0bb33
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changeset/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -16,6 +16,11 @@
Warning.ignore(/rspec-core/)
Warning.ignore(/__FILE__/)
Warning.ignore(/__LINE__/)

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4')
Warning[:strict_unused_block] = true
end

Warning.process { |w| raise w } if ENV['FAIL_ON_WARNINGS'].eql?('true')

%w[pry-byebug debug pry].each do |gem|
5 changes: 5 additions & 0 deletions core/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -14,6 +14,11 @@

Warning.ignore(/__FILE__/)
Warning.ignore(/__LINE__/)

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4')
Warning[:strict_unused_block] = true
end

Warning.process { |w| raise w } if ENV['FAIL_ON_WARNINGS'].eql?('true')

Dry::Core::Deprecations.set_logger!(SPEC_ROOT.join('../log/deprecations.log'))
5 changes: 5 additions & 0 deletions repository/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -17,6 +17,11 @@
Warning.ignore(/rspec-core/)
Warning.ignore(/__FILE__/)
Warning.ignore(/__LINE__/)

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4')
Warning[:strict_unused_block] = true
end

Warning.process { |w| raise w } if ENV['FAIL_ON_WARNINGS'].eql?('true')

require 'rom-sql'

0 comments on commit da0bb33

Please sign in to comment.