spec/unit/publishers/s3_publisher_spec.rb in omnibus-3.2.0.rc.1 vs spec/unit/publishers/s3_publisher_spec.rb in omnibus-3.2.0.rc.2

- old
+ new

@@ -31,12 +31,12 @@ let(:packages) { [package] } let(:client) { double('UberS3', store: nil) } before do - package.stub(:metadata).and_return(metadata) - subject.stub(:client).and_return(client) + allow(package).to receive(:metadata).and_return(metadata) + allow(subject).to receive(:client).and_return(client) end subject { described_class.new(path) } describe '#initialize' do @@ -50,10 +50,10 @@ .to raise_error(MissingConfigOption) end end describe '#publish' do - before { subject.stub(:packages).and_return(packages) } + before { allow(subject).to receive(:packages).and_return(packages) } it 'validates the package' do expect(package).to receive(:validate!).once subject.publish end