mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Fully-qualify ::ActiveSupport::Deprecation constant
> .. just in case we later add an ActiveSupport module within the gem. > https://github.com/airblade/paper_trail/pull/567/files#r34470343
This commit is contained in:
parent
748226b9a5
commit
c9406c016e
3 changed files with 4 additions and 4 deletions
|
@ -192,7 +192,7 @@ module PaperTrail
|
|||
end
|
||||
|
||||
def originator
|
||||
ActiveSupport::Deprecation.warn "Use paper_trail_originator instead of originator."
|
||||
::ActiveSupport::Deprecation.warn "Use paper_trail_originator instead of originator."
|
||||
self.paper_trail_originator
|
||||
end
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ module PaperTrail
|
|||
end
|
||||
|
||||
def originator
|
||||
ActiveSupport::Deprecation.warn "Use paper_trail_originator instead of originator."
|
||||
::ActiveSupport::Deprecation.warn "Use paper_trail_originator instead of originator."
|
||||
self.paper_trail_originator
|
||||
end
|
||||
|
||||
|
|
|
@ -179,13 +179,13 @@ describe Widget, :type => :model do
|
|||
it { is_expected.to respond_to(:originator) }
|
||||
|
||||
it 'should set the invoke `paper_trail_originator`' do
|
||||
allow(ActiveSupport::Deprecation).to receive(:warn)
|
||||
allow(::ActiveSupport::Deprecation).to receive(:warn)
|
||||
is_expected.to receive(:paper_trail_originator)
|
||||
subject.originator
|
||||
end
|
||||
|
||||
it 'should display a deprecation warning' do
|
||||
expect(ActiveSupport::Deprecation).to receive(:warn).
|
||||
expect(::ActiveSupport::Deprecation).to receive(:warn).
|
||||
with(/Use paper_trail_originator instead of originator/)
|
||||
subject.originator
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue