spec/objection_spec.rb in motion-objection-0.7.2 vs spec/objection_spec.rb in motion-objection-0.8

- old
+ new

@@ -97,6 +97,18 @@ it "has support for getting an object with custom arguments" do @controller = @injector.get_object ViewController, "Work" @controller.name.should.equal "Work" end end + + describe "object factory" do + before do + @object_factory = @injector[JSObjectFactory] + end + + it "will build an object via Objection" do + @object_factory[ViewController].name.should.equal "Home" + @object_factory.get_object(ViewController).name.should.equal "Home" + @object_factory.get_object(ViewController, "Work").name.should.equal "Work" + end + end end