From 44d05ede460034bbbbed2643e9a3dd1ad4f499b2 Mon Sep 17 00:00:00 2001 From: Michael Hale Date: Thu, 2 Jul 2015 14:32:04 -0400 Subject: [PATCH] Refactor create_stream mock --- lib/fog/aws/requests/kinesis/create_stream.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/fog/aws/requests/kinesis/create_stream.rb b/lib/fog/aws/requests/kinesis/create_stream.rb index 46061d767..596f7a41e 100644 --- a/lib/fog/aws/requests/kinesis/create_stream.rb +++ b/lib/fog/aws/requests/kinesis/create_stream.rb @@ -33,9 +33,6 @@ module Fog shard_count = options.delete("ShardCount") || 1 stream_arn = "arn:aws:kinesis:#{@region}:#{@account_id}:stream/#{stream_name}" - response = Excon::Response.new - response.status = 200 - if data[:kinesis_streams].detect{ |s| s["StreamName"] == stream_name } raise 'stream already exists' end @@ -62,6 +59,8 @@ module Fog "Shards" => shards, }] + response = Excon::Response.new + response.status = 200 response.body = "" response end