spec/vmc/cli/space/rename_spec.rb in vmc-0.5.0.beta.6 vs spec/vmc/cli/space/rename_spec.rb in vmc-0.5.0.beta.7
- old
+ new
@@ -3,13 +3,13 @@
describe VMC::Space::Rename do
let(:global) { { :color => false, :quiet => true } }
let(:inputs) { {} }
let(:given) { {} }
- let(:spaces) { FactoryGirl.build_list(:space, 3) }
- let(:organization) { FactoryGirl.build(:organization, :spaces => spaces) }
- let(:client) { FactoryGirl.build(:client, :current_organization => organization, :spaces => spaces) }
+ let(:spaces) { fake_list(:space, 3) }
+ let(:organization) { fake(:organization, :spaces => spaces) }
+ let(:client) { fake_client(:current_organization => organization, :spaces => spaces) }
let(:new_name) { "some-new-name" }
before do
any_instance_of(VMC::CLI) do |cli|
stub(cli).client { client }
@@ -94,10 +94,10 @@
subject
end
context 'and the name already exists' do
it 'fails' do
- mock(renamed_space).update! { raise CFoundry::SpaceNameTaken }
+ mock(renamed_space).update! { raise CFoundry::SpaceNameTaken.new nil, nil, "Taken", 404 }
expect { subject }.to raise_error(CFoundry::SpaceNameTaken)
end
end
end
end