Sha256: 7751588aebfa37fb0cfffb62eaa95c2ec5c6cbfc22e2a6fbdcad58b9ffd22632
Contents?: true
Size: 600 Bytes
Versions: 7
Compression:
Stored size: 600 Bytes
Contents
require "rails_helper" describe "announcements/_private_announcement" do before(:example) do stub_template "announcements/_public_announcement.html.erb" => "Partial" end it "renders the all partial when allowed to view announcements" do allow(view).to receive(:announcement_visibility_allowed?).and_return(true) render expect(rendered).to match /Partial/ end it "does not render the all partial when not allowed to view announcements" do allow(view).to receive(:announcement_visibility_allowed?).and_return(false) render expect(rendered).to eq "" end end
Version data entries
7 entries across 7 versions & 1 rubygems