From 5662bb723eeb74076e45cae2478c1cbda5a2a501 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Sun, 19 Jan 2014 22:30:05 +0000 Subject: [PATCH] Simplify Remote::Environment.new_from_string spec --- spec/producer/core/remote/environment_spec.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/spec/producer/core/remote/environment_spec.rb b/spec/producer/core/remote/environment_spec.rb index 1cc366a..bc2e454 100644 --- a/spec/producer/core/remote/environment_spec.rb +++ b/spec/producer/core/remote/environment_spec.rb @@ -14,15 +14,9 @@ module Producer::Core end describe '.new_from_string' do - it 'builds a new instance after converting from string' do - expect(described_class).to receive(:new).with(variables) - described_class.new_from_string(string) - end - - it 'returns the instance' do - environment = double 'environment' - allow(described_class).to receive(:new) { environment } - expect(described_class.new_from_string(string)).to be environment + it 'returns a new instance with converted keys and values' do + environment = described_class.new_from_string string + expect(environment.variables).to eq variables end end