spec/models/attachy/extension/user/photos_spec.rb in attachy-0.1.2 vs spec/models/attachy/extension/user/photos_spec.rb in attachy-0.2.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'rails_helper' RSpec.describe User, ':photos' do before do allow(Cloudinary::Uploader).to receive(:remove_tag) @@ -73,11 +75,11 @@ let!(:json) { photo.to_json } it 'does not creates a new one' do user.photos = json - expect { user.photos_files }.to_not change(Attachy::File, :count) + expect { user.photos_files }.not_to change(Attachy::File, :count) end it 'is referenced' do user.photos = json @@ -89,11 +91,11 @@ let!(:json) { [photo].to_json } it 'does not creates a new one' do user.photos = json - expect { user.photos_files }.to_not change(Attachy::File, :count) + expect { user.photos_files }.not_to change(Attachy::File, :count) end it 'is referenced' do user.photos = json @@ -107,11 +109,10 @@ build(:file, format: :jpg, height: 600, public_id: :public_id, scope: :photo, - width: 800 - ) + width: 800) end context 'as a json' do let!(:json) { photo.to_json }