spec/models/attachy/viewer/field_options_spec.rb in attachy-0.1.2 vs spec/models/attachy/viewer/field_options_spec.rb in attachy-0.2.0
- old
+ new
@@ -1,17 +1,19 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Attachy::Viewer, '.field_options' do
+ subject { described_class.new method, object }
+
let!(:object) { create :user }
let!(:method) { :avatar }
let!(:file) do
allow(Cloudinary::Uploader).to receive(:remove_tag)
create :file, attachable: object, scope: method
end
-
- subject { described_class.new method, object }
it 'returns the default field options' do
expect(subject.field_options).to eq(class: :attachy)
end
end