spec/arborist/manager_spec.rb in arborist-0.0.1.pre20161005182540 vs spec/arborist/manager_spec.rb in arborist-0.1.0

- old
+ new

@@ -131,11 +131,11 @@ saved_router_node = Marshal.load( Marshal.dump(router_node) ) saved_router_node.instance_variable_set( :@status, 'up' ) saved_host_node = Marshal.load( Marshal.dump(host_node) ) saved_host_node.instance_variable_set( :@status, 'down' ) - saved_host_node.error = 'Stuff happened and it was not good.' + saved_host_node.errors = { '_' => 'Stuff happened and it was not good.' } expect( statefile ).to receive( :readable? ).and_return( true ) expect( statefile ).to receive( :open ).with( 'r:binary' ). and_return( state_file_io ) expect( Marshal ).to receive( :load ).with( state_file_io ). @@ -143,10 +143,10 @@ expect( manager.restore_node_states ).to be_truthy expect( manager.nodes['router'].status ).to eq( 'up' ) expect( manager.nodes['host-a'].status ).to eq( 'down' ) - expect( manager.nodes['host-a'].error ).to eq( 'Stuff happened and it was not good.' ) + expect( manager.nodes['host-a'].errors ).to eq({ '_' => 'Stuff happened and it was not good.' }) end it "doesn't error if the configured state file isn't readable" do