Sha256: 96d0333a8489c13e380fbfeef8f483f480a0f018417252b68d197e9da8c9659b
Contents?: true
Size: 878 Bytes
Versions: 6
Compression:
Stored size: 878 Bytes
Contents
require 'spec_helper' require 'bh/helpers/alert_helper' require 'bh/helpers/url_helper' include Bh::AlertHelper include Bh::UrlHelper describe 'link_to' do context 'used without a block' do let(:link) { link_to 'Home', '/' } specify 'does not apply the "alert_link" class if used outside of an alert' do expect(link).not_to include 'alert-link' end specify 'applies the "alert_link" class if used inside an alert' do expect(alert_box { link }).to include 'alert-link' end end context 'used with a block' do let(:link) { link_to('/') { 'Home' } } specify 'does not apply the "alert_link" class if used outside of an alert' do expect(link).not_to include 'alert-link' end specify 'applies the "alert_link" class if used inside an alert' do expect(alert_box { link }).to include 'alert-link' end end end
Version data entries
6 entries across 6 versions & 1 rubygems