spec/capistrano/env/plugin_spec.rb in capistrano-env-0.0.5 vs spec/capistrano/env/plugin_spec.rb in capistrano-env-0.0.6
- old
+ new
@@ -3,13 +3,19 @@
describe Capistrano::Env::Plugin do
let(:capistrano) { Capistrano::Configuration.new }
describe :capenv do
- let(:setup) { capistrano.capenv.use {|config| ; } }
+ let(:setup) { capistrano.capenv.use {|config| config.add "HELLO", "WORLD" } }
+
it 'add task' do
expect(capistrano.capenv).to receive(:add)
setup
end
it { expect(setup).to be_a Capistrano::Env::Config }
+
+ it "set default_environment" do
+ setup
+ expect(capistrano.fetch(:default_environment)).to eq "HELLO" => "WORLD"
+ end
end
end