files.flatten.each do |file|
it "should rewrite #{file} reasonably unchanged" do
- provider.stubs(:default_target).returns(file)
+ allow(provider).to receive(:default_target).and_return(file)
provider.prefetch
text = provider.to_file(provider.target_records(file))
it 'tries and set the recipient when it does the sync' do
expect(recipient_resource.retrieve_resource[:recipient]).to eq(:absent)
- recipient_resource.property(:recipient).expects(:set).with(['yay'])
+ expect(recipient_resource.property(:recipient)).to receive(:set).with(['yay'])
recipient_resource.property(:recipient).sync
end
it 'tries and set the included file when it does the sync' do
expect(file_resource.retrieve_resource[:file]).to eq(:absent)
- file_resource.property(:file).expects(:set).with(tmpfile_path)
+ expect(file_resource.property(:file)).to receive(:set).with(tmpfile_path)
file_resource.property(:file).sync
end