1
0
Fork 0
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:
Jared Beck 2015-07-13 13:36:34 -04:00
parent 748226b9a5
commit c9406c016e
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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