spec/cuboid/option_groups/paths_spec.rb in cuboid-0.0.3 vs spec/cuboid/option_groups/paths_spec.rb in cuboid-0.0.4

- old
+ new

@@ -68,11 +68,11 @@ end end describe '#logs' do it 'returns the default location' do - expect(subject.logs).to eq("#{subject.root}logs/") + expect(subject.logs).to eq("#{subject.home_path}logs/") end context 'when the CUBOID_LOGDIR environment variable' do after { ENV['CUBOID_LOGDIR'] = '' } @@ -89,17 +89,18 @@ 'logs' => 'logs-stuff/' } end expect(described_class.new.logs).to eq('logs-stuff/') + @created_resources << described_class.new.logs end end end describe '#snapshots' do it 'returns the default location' do - expect(subject.snapshots).to eq("#{subject.root}snapshots/") + expect(subject.snapshots).to eq("#{subject.home_path}snapshots/") end context "when #{described_class}.config['snapshots']" do it 'returns its value' do allow(described_class).to receive(:config) do @@ -107,17 +108,18 @@ 'snapshots' => 'snapshots-stuff/' } end expect(described_class.new.snapshots).to eq('snapshots-stuff/') + @created_resources << described_class.new.snapshots end end end describe '#reports' do it 'returns the default location' do - expect(subject.reports).to eq("#{subject.root}reports/") + expect(subject.reports).to eq("#{subject.home_path}reports/") end context "when #{described_class}.config['reports']" do it 'returns its value' do allow(described_class).to receive(:config) do @@ -125,9 +127,10 @@ 'reports' => 'reports-stuff/' } end expect(described_class.new.reports).to eq('reports-stuff/') + @created_resources << described_class.new.reports end end end describe '.config' do