spec/models/attachy/viewer/content_options_spec.rb in attachy-0.1.2 vs spec/models/attachy/viewer/content_options_spec.rb in attachy-0.2.0

- old
+ new

@@ -1,19 +1,21 @@ +# frozen_string_literal: true + require 'rails_helper' RSpec.describe Attachy::Viewer, '.content_options' do + subject { described_class.new method, object, options } + let!(:object) { create :user } let!(:method) { :avatar } let(:file) { create :file, attachable: object, scope: method } let!(:options) { { t: { height: 600, width: 800 } } } before do allow(Cloudinary::Uploader).to receive(:remove_tag) allow(subject).to receive(:metadata) { { crop: :crop, multiple: :multiple } } end - - subject { described_class.new method, object, options } it 'returns the default field options' do expect(subject.content_options).to eq( class: :attachy__content,