Sha256: 48173c8c6eb2ca6a6b12a1cac7fddff202c9da08db72e4d3d6bc87eddfb19f5a
Contents?: true
Size: 1.34 KB
Versions: 11
Compression:
Stored size: 1.34 KB
Contents
require 'spec_helper' describe Hanzo::Fetchers::Environment do let(:fetcher) { Hanzo::Fetchers::Environment.new(current_environment) } let(:current_environment) { 'production' } describe :exist? do let(:environments) { ['production'] } before { expect(fetcher).to receive(:environments).and_return(environments) } context 'with an existing environment' do it { expect(fetcher.exist?).to be_truthy } end context 'with an unexisting environment' do let(:current_environment) { 'staging' } it { expect(fetcher.exist?).to be_falsey } end end describe :installed? do let(:environments) { ['production'] } before { expect(fetcher).to receive(:installed_environments).and_return(environments) } context 'with an installed environment' do it { expect(fetcher.installed?).to be_truthy } end context 'with an uninstalled environment' do let(:current_environment) { 'staging' } it { expect(fetcher.installed?).to be_falsey } end end describe :installed_environments do before { expect(Hanzo::Installers::Remotes).to receive(:installed_environments) } specify { fetcher.send(:installed_environments) } end describe :environments do before { expect(Hanzo::Installers::Remotes).to receive(:environments) } specify { fetcher.send(:environments) } end end
Version data entries
11 entries across 11 versions & 1 rubygems