Sha256: 63a663cf5ba4fbbf4f9c394e49c9ee962cc4ef36dcf196bbfb376a4334098ff0
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
# coding: UTF-8 require 'spec_helper' class Snipp::Markup::Html::Spec DEFAULT_SCOPE = [:default, :meta] PAGE_SCOPE = [:views, :snipp, :html, :meta] META = { title: I18n.t(:title ,scope: PAGE_SCOPE, value: "Embedding Values"), description: I18n.t(:description ,scope: PAGE_SCOPE), keywords: I18n.t(:keywords ,scope: DEFAULT_SCOPE) } OG = { site_name: I18n.t("og.site_name" ,scope: DEFAULT_SCOPE), title: I18n.t("og.title" ,scope: PAGE_SCOPE ,text: "Insert"), description: I18n.t("og.description" ,scope: DEFAULT_SCOPE), type: "article" } end describe Snipp::Markup::Html do before do Snipp::Hooks.init visit "/html" #puts page.html end context "HTML Meta Tags" do Snipp::Markup::Html::Spec::META.each do |key, value| it "should have a `#{key}` tag" do expect(page).to have_selector("meta[name=\"#{key}\"][content=\"#{value}\"]", count: 1) end end Snipp::Markup::Html::Spec::OG.each do |key, value| it "should have a `og:#{key}` tag" do expect(page).to have_selector("meta[property=\"og:#{key}\"][content=\"#{value}\"]", count: 1) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
snipp-0.1.2 | spec/snipp/markups/html_spec.rb |