spec/models/attachy/viewer/button_label_spec.rb in attachy-0.1.2 vs spec/models/attachy/viewer/button_label_spec.rb in attachy-0.2.0
- old
+ new
@@ -1,15 +1,17 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe Attachy::Viewer, '.button_label' do
+ subject { described_class.new method, object, options }
+
let!(:method) { :avatar }
let!(:object) { create :user }
let(:file) { create :file, attachable: object }
let!(:options) { { button: { html: { key: :value } } } }
before { allow(Cloudinary::Uploader).to receive(:remove_tag) }
-
- subject { described_class.new method, object, options }
describe 'default options' do
it 'uses generic button options' do
el = subject.button_label