spec/views/shared/_footer.html.erb_spec.rb in blacklight-spotlight-0.1.0 vs spec/views/shared/_footer.html.erb_spec.rb in blacklight-spotlight-0.2.0
- old
+ new
@@ -1,12 +1,12 @@
require 'spec_helper'
module Spotlight
- describe "shared/_footer" do
+ describe "shared/_footer", :type => :view do
let(:current_exhibit) { double(title: "Some title", subtitle: "Subtitle") }
it "should display social media links" do
- view.stub(current_exhibit: current_exhibit)
+ allow(view).to receive_messages(current_exhibit: current_exhibit)
render
expect(rendered).to have_selector('footer .social-share-button a.social-share-button-twitter[title="Twitter"]')
expect(rendered).to have_selector('footer .social-share-button a.social-share-button-facebook[title="Facebook"]')
expect(rendered).to have_selector('footer .social-share-button a.social-share-button-google_plus[title="Google+"]')
end