spec/models/attachy/file/default_spec.rb in attachy-0.4.0 vs spec/models/attachy/file/default_spec.rb in attachy-0.4.1

- old
+ new

@@ -1,9 +1,17 @@ # frozen_string_literal: true require 'rails_helper' RSpec.describe Attachy::File, '#default' do + context 'when config is missing' do + before do + allow(::Rails).to receive_message_chain(:application, :config_for) { nil } + end + + specify { expect(described_class.default).to eq nil } + end + context 'when default image is present' do before do allow(::Rails).to receive_message_chain(:application, :config_for).with(:attachy) do { 'default' => {