spec/micon/static_scope_spec.rb in ruby-ext-0.4.2 vs spec/micon/static_scope_spec.rb in ruby-ext-0.4.3

- old
+ new

@@ -2,30 +2,30 @@ require "#{dir}/helper" describe "Application and Instance scopes" do before :each do Micon.clear - Micon.clear_registry + Micon.metadata.clear end it "instance scope" do - Micon.register(:value, :instance){"The Object"} + Micon.register(:value, :scope => :instance){"The Object"} Micon[:value].should == "The Object" Micon[:value].object_id.should_not == Micon[:value].object_id end it "application scope" do - Micon.register(:value, :application){"The Object"} + Micon.register(:value){"The Object"} Micon[:value].should == "The Object" Micon[:value].object_id.should == Micon[:value].object_id end it "application scope, outjection" do the_object = "The Object" - Micon.register :value, :application + Micon.register :value Micon[:value].should be_nil Micon[:value] = the_object Micon[:value].object_id.should == the_object.object_id end @@ -50,12 +50,12 @@ a.b.equal?(b).should be_true b.a.equal?(a).should be_true end it "unregister" do - Micon.register(:value, :application){"The Object"} + Micon.register(:value){"The Object"} Micon[:value].should == "The Object" Micon.unregister :value - lambda{Micon[:value]}.should raise_error(/Name is not Managed/) + lambda{Micon[:value]}.should raise_error(/component not managed/) end end \ No newline at end of file