spec/egi_spec.rb in egi-0.0.1 vs spec/egi_spec.rb in egi-0.0.2

- old
+ new

@@ -22,10 +22,17 @@ } env(:env2) { item :a, { :hoge => :ugu } } + +env(:env_group) { + group(:hoge) { + item :a, { :hoge => :fuga } + item :b, { :tags => [ :fuga ] } + } +} EOS context "\n#{environments}" do before(:all) { described_class.load(environments) } after(:all) { described_class.reset } @@ -40,9 +47,15 @@ context 'makes env2' do subject { described_class[:env2] } it { should have_item(:a, :hoge => :ugu) } its(:b) { should be_nil } + end + + context 'makes env_group' do + subject { described_class[:env_group] } + it { should have_item(:a, :hoge => :fuga, :tags => [ :hoge ]) } + it { should have_item(:b, :tags => [ :hoge, :fuga ]) } end context 'does not make env3' do subject { described_class[:env3] } it { should be_nil }