spec/objection_spec.rb in motion-objection-0.5 vs spec/objection_spec.rb in motion-objection-0.6
- old
+ new
@@ -1,9 +1,17 @@
describe "Objection" do
before do
@injector = Objection.injector
end
+ describe "#default_injector" do
+ it "returns the default injector" do
+ Objection.default_injector.should.equal nil
+ Objection.default_injector = @injector
+ Objection.default_injector.should.equal @injector
+ end
+ end
+
describe "dependency injection" do
it "supports inheritance" do
@engine = @injector[V6Engine]
@engine.crank_shaft.class.should.be.same_as Engine::CrankShaft