Skip to content

Commit

Permalink
Returning the wrong double
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandoyle committed Jun 30, 2014
1 parent 5313976 commit 01f3a90
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions spec/mcc/openvz_spec.rb
Expand Up @@ -5,16 +5,6 @@

let(:images) { double("Images") }
let(:openvz) { MCC::OpenVZ.new("1.1.1.1-1.1.1.20", images) }
let(:single_instance_stdout) { "101 1.1.1.1 running ubuntu instance1\n" }
let(:all_instances_stdout) {
"101 1.1.1.1 running ubuntu instance1\n" +
"102 1.1.1.2 stopped centos instance2\n" +
"103 1.1.1.3 running redhat instance3\n"
}
let(:running_instances_stdout) {
"101 1.1.1.1 running ubuntu instance1\n" +
"103 1.1.1.3 running redhat instance3\n"
}
let(:instance_types_stdout) {
"ve-basic.conf-sample\n" +
"ve-light.conf-sample\n" +
Expand Down Expand Up @@ -78,7 +68,7 @@ def expect_shell_command(command)
expect(openvz.get_instances( 'all' => true)).to eql [ instance1, instance2 ]
end
it 'should return all running instances by default' do
allow(instances_double).to receive(:running).and_return [ instance1 ]
allow(instances_double).to receive(:running).and_return [ instances_double1 ]
expect(openvz.get_instances).to eql [ instance1 ]
end
end
Expand Down

0 comments on commit 01f3a90

Please sign in to comment.