Sha256: c66855de6cf51c71776ac31503bdbd62a5f0d9ac77845784e9030db72207a638
Contents?: true
Size: 994 Bytes
Versions: 2
Compression:
Stored size: 994 Bytes
Contents
require 'spec_helper' require_relative '../factories/environment.rb' describe 'Test 01: Bebox::EnvironmentWizard' do subject { Bebox::EnvironmentWizard.new } let(:environment) { build(:environment) } before :each do $stdout.stub(:write) end context '00: environment not exist' do it 'creates a new environment with wizard' do Bebox::Environment.stub(:environment_exists?) { false } Bebox::Environment.any_instance.stub(:create) { true } output = subject.create_new_environment(environment.project_root, environment.name) expect(output).to eq(true) end end context '01: environment exist' do it 'removes an environment with wizard' do Bebox::Environment.stub(:environment_exists?) { true } Bebox::Environment.any_instance.stub(:remove) { true } $stdin.stub(:gets).and_return('y') output = subject.remove_environment(environment.project_root, environment.name) expect(output).to eq(true) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bebox-0.1.2 | spec/wizards/environment_wizard_spec.rb |
bebox-0.1.1 | spec/wizards/environment_wizard_spec.rb |