Sha256: f2ef1b87fcaa42afb3f5a178117f27c327d88594ef5f14b2bbd8e7b59f378542
Contents?: true
Size: 1007 Bytes
Versions: 46
Compression:
Stored size: 1007 Bytes
Contents
$:.unshift(File.dirname(__FILE__)) require 'spec_helper' describe "apple_webclip plugin" do def setup_apple_webclip_plugin( url ) fake_plugin(:apple_webclip) { |plugin| plugin.conf['apple_webclip.url'] = url } end describe "url is enabled" do before do plugin = setup_apple_webclip_plugin('http://example.com/example.png') @header_snippet = plugin.header_proc end it "header include url" do expect(@header_snippet).to eq(%Q|\t<link rel="apple-touch-icon" href="http://example.com/example.png">|) end end describe "url is disabled" do describe "url is empty" do before do plugin = setup_apple_webclip_plugin('') @header_snippet = plugin.header_proc end it "header is empty" do expect(@header_snippet).to be_empty end end describe "url is nil" do before do plugin = setup_apple_webclip_plugin(nil) @header_snippet = plugin.header_proc end it "header is empty" do expect(@header_snippet).to be_empty end end end end
Version data entries
46 entries across 40 versions & 2 rubygems