From b5f14c6eeaaf8cc70287f3b1b2f74441157ac4b6 Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Fri, 4 Jun 2010 11:05:09 -0700 Subject: {#3866] Rename the method metaclass to singleton_class to avoid the deprecation warnings from Rails ActiveSupport The metaid.rb file came straight from why the lucky stiff's "seeing metaclasses clearly" article. Rails used this too, but they recently deprecated the name metaclass in favor of singleton_class to match what ruby-core decided to do. meta, eigen and singlton class were all suggested and in the end singleton was agreed upon. http://redmine.ruby-lang.org/issues/show/1082 --- spec/unit/file_serving/content.rb | 2 +- spec/unit/file_serving/metadata.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/unit/file_serving') diff --git a/spec/unit/file_serving/content.rb b/spec/unit/file_serving/content.rb index cba703902..f772b861f 100755 --- a/spec/unit/file_serving/content.rb +++ b/spec/unit/file_serving/content.rb @@ -14,7 +14,7 @@ describe Puppet::FileServing::Content do end it "should should include the IndirectionHooks module in its indirection" do - Puppet::FileServing::Content.indirection.metaclass.included_modules.should include(Puppet::FileServing::IndirectionHooks) + Puppet::FileServing::Content.indirection.singleton_class.included_modules.should include(Puppet::FileServing::IndirectionHooks) end it "should only support the raw format" do diff --git a/spec/unit/file_serving/metadata.rb b/spec/unit/file_serving/metadata.rb index 22f033d4d..ef2b3b6f0 100755 --- a/spec/unit/file_serving/metadata.rb +++ b/spec/unit/file_serving/metadata.rb @@ -14,7 +14,7 @@ describe Puppet::FileServing::Metadata do end it "should should include the IndirectionHooks module in its indirection" do - Puppet::FileServing::Metadata.indirection.metaclass.included_modules.should include(Puppet::FileServing::IndirectionHooks) + Puppet::FileServing::Metadata.indirection.singleton_class.included_modules.should include(Puppet::FileServing::IndirectionHooks) end it "should have a method that triggers attribute collection" do -- cgit