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

- old
+ new

@@ -1,8 +1,12 @@ +# frozen_string_literal: true + require 'rails_helper' RSpec.describe Attachy::Viewer, '.content' do + subject { described_class.new method, object, options } + let!(:method) { :avatar } let!(:object) { create :user } let!(:options) { { button: { html: { key: :value } } } } let!(:file) do @@ -19,11 +23,9 @@ allow(nodes).to receive(:join) { join } allow(join).to receive(:html_safe) { :safe } allow(subject).to receive(:content_options) { { class: :attachy__content } } end - - subject { described_class.new method, object, options } describe 'default options' do it 'uses generic button options' do el = subject.content