class RuboCop::Cop::RSpec::RemoveConst
Checks that ‘remove_const` is not used in specs.
@example
# bad it 'does something' do Object.send(:remove_const, :SomeConstant) end before do SomeClass.send(:remove_const, :SomeConstant) end
Constants
- MSG
- RESTRICT_ON_SEND
Public Instance Methods
Source
# File lib/rubocop/cop/rspec/remove_const.rb, line 31 def on_send(node) remove_const(node) do add_offense(node) end end
Check for offenses