Sha256: 16ccf549774e0402ae9058f881d873c4728fc6eaba63f521bdcc6c3df20f7e43
Contents?: true
Size: 994 Bytes
Versions: 3
Compression:
Stored size: 994 Bytes
Contents
require 'spec_helper' require_relative '../factories/environment.rb' describe 'Test 02: 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bebox-0.1.5 | spec/wizards/environment_wizard_spec.rb |
bebox-0.1.4 | spec/wizards/environment_wizard_spec.rb |
bebox-0.1.3 | spec/wizards/environment_wizard_spec.rb |