spec/punchblock/component/component_node_spec.rb in punchblock-1.9.4 vs spec/punchblock/component/component_node_spec.rb in punchblock-2.0.0.beta1

- old
+ new

@@ -50,11 +50,11 @@ subject.request! subject.execute! end describe "with an event handler set" do - let(:handler) { mock 'Response' } + let(:handler) { double 'Response' } before do handler.should_receive(:call).once.with(event) subject.register_event_handler { |event| handler.call event } end @@ -72,13 +72,11 @@ end let(:component_id) { 'abc123' } let :ref do - Ref.new.tap do |ref| - ref.id = component_id - end + Ref.new uri: component_id end it "should set the component ID from the ref" do subject.response = ref subject.component_id.should be == component_id @@ -88,10 +86,10 @@ describe "#complete_event=" do before do subject.request! subject.client = Client.new - subject.response = Ref.new id: 'abc' + subject.response = Ref.new uri: 'abc' subject.client.find_component_by_id('abc').should be subject end it "should set the command to executing status" do subject.complete_event = :foo