spec/arborist/event/node_spec.rb in arborist-0.2.0.pre20170519125456 vs spec/arborist/event/node_spec.rb in arborist-0.2.0
- old
+ new
@@ -24,9 +24,14 @@
end
end
let( :event ) { described_class.new(node) }
+ it "serializes with useful metadata attached" do
+ expect( event.to_h ).to include( :identifier, :parent, :nodetype )
+ expect( event.to_h[:nodetype] ).to eq( 'testnode' )
+ end
+
it "matches match-anything subscriptions" do
sub = Arborist::Subscription.new {}
expect( event ).to match( sub )
end