Sha256: 77d1a9b6373e79c2b513900baa4f77159682d1fa165bf92e23a4d16e4017e126
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe Breadcrumby::Viewer, '.breadcrumbs' do subject { described_class.new object, options, view } let!(:object) { build :school } let!(:options) { {} } let!(:view) { double } let!(:home) { double Breadcrumby::Home } before do Unit.class_eval { breadcrumby } allow(Breadcrumby::Home).to receive(:new).with(view) { home } end it 'returns the objects including the home' do expect(subject.breadcrumbs(object)).to eq [ Breadcrumby::Home.new(view), object ] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
breadcrumby-0.1.0 | spec/lib/breadcrumby/models/viewer/breadcrumbs_spec.rb |