spec/cli_spec.rb in simple_deploy-0.7.6.beta.3 vs spec/cli_spec.rb in simple_deploy-0.7.6.beta.5
- old
+ new
@@ -9,7 +9,29 @@
status_mock.should_receive(:show)
SimpleDeploy::CLI::Status.stub :new => status_mock
SimpleDeploy::CLI.start
end
+ describe 'environments' do
+ let(:env) { mock('env').tap { |m| m.should_receive(:environments) } }
+
+ before do
+ ARGV.stub :shift => 'environments'
+ SimpleDeploy::CLI::Environments.stub :new => env
+ end
+
+ it 'calls the correct command' do
+ SimpleDeploy::CLI.start
+ end
+
+ context 'envs' do
+ before { ARGV.stub :shift => 'envs'}
+
+ it 'calls the correct command' do
+ SimpleDeploy::CLI.start
+ end
+ end
+
+ end
+
end