diff --git a/spec/unit/openstack_server_create_spec.rb b/spec/unit/openstack_server_create_spec.rb index 3d8d1c60..fa5756b0 100644 --- a/spec/unit/openstack_server_create_spec.rb +++ b/spec/unit/openstack_server_create_spec.rb @@ -13,10 +13,17 @@ it_behaves_like Chef::Knife::Cloud::ServerCreateCommand, Chef::Knife::Cloud::OpenstackServerCreate.new describe "#create_service_instance" do + before(:each) do + @instance = Chef::Knife::Cloud::OpenstackServerCreate.new + end + it "return OpenstackService instance" do - instance = Chef::Knife::Cloud::OpenstackServerCreate.new - expect(instance.create_service_instance).to be_an_instance_of(Chef::Knife::Cloud::OpenstackService) + expect(@instance.create_service_instance).to be_an_instance_of(Chef::Knife::Cloud::OpenstackService) end + + it "has custom_arguments as its option" do + expect(@instance.options.include? :custom_attributes).to be true + end end describe "#validate_params!" do