Commits

Michael Granger committed 3790157

Fix specs for FactoryError changes; add backward-compatibility constant.

Comments (0)

Files changed (2)

lib/pluggability.rb

 
 end # module Pluggability
 
+
+# Backward-compatibility alias
+FactoryError = Pluggability::FactoryError unless defined?( FactoryError )
+

spec/pluggability_spec.rb

 
 			expect {
 				Plugin.create('scintillating')
-			}.to raise_error( FactoryError, /couldn't find a \S+ named \S+.*tried \[/i )
+			}.to raise_error( Pluggability::FactoryError, /couldn't find a \S+ named \S+.*tried \[/i )
 		end
 
 
 
 			expect {
 				Plugin.create('corruscating')
-			}.to raise_error( FactoryError, /Require of '\S+' succeeded, but didn't load a Plugin/i )
+			}.to raise_error( Pluggability::FactoryError, /Require of '\S+' succeeded, but didn't load a Plugin/i )
 		end
 
 
 			TestingPlugin.stub!( :ancestors ).and_return( [] )
 			expect {
 				TestingPlugin.factory_type
-			}.to raise_error( FactoryError, /couldn't find factory base/i )
+			}.to raise_error( Pluggability::FactoryError, /couldn't find factory base/i )
 		end
 	end