Sha256: 44d90a0f9394c3940aa4b280e858ee9546a92080a09d9ecb1e3fa326c34ec291
Contents?: true
Size: 809 Bytes
Versions: 2
Compression:
Stored size: 809 Bytes
Contents
require 'spec_helper' module Spotlight describe "shared/_exhibit_masthead" do let(:current_exhibit) { double(title: "Some title", subtitle: "Subtitle") } let(:current_exhibit_without_subtitle) { double(title: "Some title", subtitle: nil) } it "should display the title and subtitle" do view.stub(current_exhibit: current_exhibit) render expect(rendered).to have_selector('.site-title', text: "Some title") expect(rendered).to have_selector('.site-title small', text: "Subtitle") end it "should display just the title" do view.stub(current_exhibit: current_exhibit_without_subtitle) render expect(rendered).to have_selector('.site-title', text: "Some title") expect(rendered).to_not have_selector('.site-title small') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blacklight-spotlight-0.1.0 | spec/views/shared/_exhibit_masthead.html.erb_spec.rb |
blacklight-spotlight-0.0.3 | spec/views/shared/_exhibit_masthead.html.erb_spec.rb |