Commits

Michael Granger  committed 3790157

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

  • Participants
  • Parent commits a5ca03d
  • Tags v0.0.1

Comments (0)

Files changed (2)

File lib/pluggability.rb

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

File 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