spec/lib/awsum/ec2/parsers/instance_parser_spec.rb in awsum-0.5 vs spec/lib/awsum/ec2/parsers/instance_parser_spec.rb in awsum-0.5.1

- old
+ new

@@ -22,11 +22,11 @@ :key_name => 'gsg-keypair', :launch_index => 0, :type => 'm1.small', :availability_zone => 'us-east-1b', :launch_time => Time.parse('2008-06-18T12:51:52.000Z'), - :state => {:code => 0, :name => 'pending'} + :state => Ec2::State.new(0, 'pending') }.each do |key, value| it "should have the correct #{key}" do instance.send(key).should == value end end @@ -34,11 +34,12 @@ context "the second instance" do let(:instance) { result[1] } it "should have the correct state" do - instance.state.should == {:code => 16, :name => 'running'} + instance.state.should == 16 + instance.state.should == 'running' end end end describe "Ec2::InstanceParser with the result of RunInstances" do @@ -62,10 +63,10 @@ :key_name => nil, :launch_index => 0, :type => 'm1.small', :availability_zone => 'us-east-1b', :launch_time => Time.parse('2009-01-11T13:09:01.000Z'), - :state => {:code => 0, :name => 'pending'} + :state => Ec2::State.new(0, 'pending') }.each do |key, value| it "should have the correct #{key}" do instance.send(key).should == value end end