Skip to content

Commit

Permalink
Merge pull request #16046 from chrisarcand/remove-any-instance-of-in-…
Browse files Browse the repository at this point in the history
…miq-request

Remove any_instance_ofs in miq_request spec
  • Loading branch information
bdunne authored Sep 26, 2017
2 parents 41b5ef7 + 4a60559 commit 8547972
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/models/automation_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@
end

it "calls #call_automate_event_queue('request_approved')" do
expect_any_instance_of(AutomationRequest).to receive(:call_automate_event_queue).with('request_approved').once
expect(@ar).to receive(:call_automate_event_queue).with('request_approved').once
@ar.approve(@approver, @reason)
end

it "calls #execute" do
expect_any_instance_of(AutomationRequest).to receive(:execute).once
expect(@ar).to receive(:execute).once
@ar.approve(@approver, @reason)
end
end
Expand All @@ -212,9 +212,9 @@
before(:each) do
@ar = AutomationRequest.create_from_ws(@version, admin, @uri_parts, @parameters, {})
root = {'ae_result' => 'ok'}
ws = double('ws')
allow(ws).to receive_messages(:root => root)
allow_any_instance_of(AutomationRequest).to receive(:call_automate_event).and_return(ws)
@ws = double('ws')
allow(@ws).to receive_messages(:root => root)
allow(@ar).to receive(:call_automate_event).and_return(@ws)

@ar.create_request_tasks
@ar.reload
Expand Down

0 comments on commit 8547972

Please sign in to comment.