Sha256: 19e0cc1b66b4cbf0abaa5e56d5986b9b5d89fc065c6827be6a9d174d7e26765b

Contents?: true

Size: 534 Bytes

Versions: 3

Compression:

Stored size: 534 Bytes

Contents

require 'spec_helper'
require 'capistrano'

describe Capistrano::Env::Plugin do
  let(:capistrano) { Capistrano::Configuration.new }

  describe '#capenv' do
    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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capistrano-env-0.2.0 spec/capistrano/env/plugin_spec.rb
capistrano-env-0.1.2 spec/capistrano/env/plugin_spec.rb
capistrano-env-0.1.1 spec/capistrano/env/plugin_spec.rb