spec/unit/path_spec.rb in cookbook-omnifetch-0.1.0 vs spec/unit/path_spec.rb in cookbook-omnifetch-0.2.0

- old
+ new

@@ -90,9 +90,20 @@ metadata: true EOH end end + describe '#lock_data' do + it 'includes the path relative to the Berksfile' do + expect(subject.lock_data).to eq({ "path" => relative_path.to_s }) + end + + it 'includes the metadata attribute' do + subject.stub(:metadata?).and_return(true) + expect(subject.lock_data).to eq({ "path" => relative_path.to_s, "metadata" => true }) + end + end + describe '#to_s' do it 'uses the relative path' do expect(subject.to_s).to eq("source at #{relative_path}") end end