Sha256: 7b5d6a092ec86128e4e71a40fa9c4cbf263f070970ae3acdbc914e4bb935a743
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' class DummyHelper include Breadcrumby::ViewHelper end RSpec.describe DummyHelper, '.breadcrumby' do let!(:object) { create :school, name: 'School 1' } let!(:options) { { key: :value } } let!(:helper) { DummyHelper.new } let!(:viewer) { double Breadcrumby::Viewer, breadcrumb: :breadcrumb } before do allow(Breadcrumby::Viewer).to receive(:new).with(object, options, helper) { viewer } end it 'calls breadcrumb from viewer' do expect(helper.breadcrumby(object, options)).to eq :breadcrumb end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
breadcrumby-0.1.0 | spec/lib/breadcrumby/helpers/breadcrumby_spec.rb |