spec/google/compute/zone_operation_spec.rb in knife-google-1.0.0 vs spec/google/compute/zone_operation_spec.rb in knife-google-1.1.0
- old
+ new
@@ -25,37 +25,37 @@
Google::Compute::Client.from_json(mock_data_file(Google::Compute::Client))
end
it_should_behave_like Google::Compute::Resource
- it "#list should return an array of zone operations" do
+ it '#list should return an array of zone operations' do
@mock_api_client.should_receive(:execute).
with(:api_method=>mock_compute.zone_operations.list,
- :parameters=>{ :project=>"mock-project"},:body_object=>nil).
+ :parameters=>{ :project=>'mock-project'},:body_object=>nil).
and_return(mock_response(Google::Compute::ZoneOperation, true))
operations = client.zoneOperations.list
operations.should_not be_empty
operations.all?{|o| o.is_a?(Google::Compute::ZoneOperation)}.should be_true
end
- it "#get should return an individual zone operation" do
+ it '#get should return an individual zone operation' do
@mock_api_client.should_receive(:execute).
with(:api_method=>mock_compute.zone_operations.get,
- :parameters=>{"zoneOperation"=>"mock-zone-operation", :project=>"mock-project"},:body_object=>nil).
+ :parameters=>{'zoneOperation'=>'mock-zone-operation', :project=>'mock-project'},:body_object=>nil).
and_return(mock_response(Google::Compute::ZoneOperation))
operation = client.zoneOperations.get('mock-zone-operation')
operation.should be_a_kind_of Google::Compute::ZoneOperation
operation.name.should eq('mock-zone-operation')
operation.should respond_to(:progress)
operation.start_time.should be_a_kind_of(Time)
end
- it "#delete should delete an existing zone operation" do
+ it '#delete should delete an existing zone operation' do
@mock_api_client.should_receive(:execute).
with(:api_method=>mock_compute.zone_operations.delete,
- :parameters=>{"zoneOperation"=>"mock-zone-operation", :project=>"mock-project"},:body_object=>nil).
+ :parameters=>{'zoneOperation'=>'mock-zone-operation', :project=>'mock-project'},:body_object=>nil).
and_return(mock_response)
client.zoneOperations.delete('mock-zone-operation')
end
end