spec/unit/berkshelf/dependency_spec.rb in berkshelf-3.1.5 vs spec/unit/berkshelf/dependency_spec.rb in berkshelf-3.2.0
- old
+ new
@@ -119,15 +119,15 @@
describe "#cached_cookbook"
describe "#download"
describe '#installed?' do
it 'returns true if self.cached_cookbook is not nil' do
- subject.stub(:cached_cookbook) { double('cb') }
- expect(subject.installed?).to be_true
+ allow(subject).to receive(:cached_cookbook) { double('cb') }
+ expect(subject.installed?).to be(true)
end
it 'returns false if self.cached_cookbook is nil' do
- subject.stub(:cached_cookbook) { nil }
- expect(subject.installed?).to be_false
+ allow(subject).to receive(:cached_cookbook) { nil }
+ expect(subject.installed?).to be(false)
end
end
end