Sha256: 89017be53b6c6b0891db3f68ee5beb8974e4a94581acdbbb7994145b80f4defe
Contents?: true
Size: 592 Bytes
Versions: 4
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' class DummyHelper include Attachy::ViewHelper end RSpec.describe DummyHelper, '.attachy_content' do let!(:method) { :avatar } let!(:options) { { key: :value } } let!(:object) { create :user } let!(:helper) { DummyHelper.new } let!(:viewer) { double Attachy::Viewer, content: :content } before do allow(Attachy::Viewer).to receive(:new).with(method, object, options, helper) { viewer } end it 'calls content from viewer' do expect(helper.attachy_content(method, object, options)).to eq :content end end
Version data entries
4 entries across 4 versions & 1 rubygems