Sha256: 6ab2f7cd781023b0987f2370ac6e2b3f35bbb48c947ecad94e41f8a3fcd37ada
Contents?: true
Size: 1.99 KB
Versions: 1
Compression:
Stored size: 1.99 KB
Contents
require 'spec_helper' describe Rack::DevMark::Theme::GithubForkRibbon do it_behaves_like "theme" do let :out do s = <<-EOS <html><head>head<title>title</title></head><body><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style> <!--[if lt IE 9]> <style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.ie.css"}</style> <![endif]--> <div class="github-fork-ribbon-wrapper left" onClick="this.style.display='none'" title="rev"><div class="github-fork-ribbon red"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html> EOS s.strip end subject { Rack::DevMark::Theme::GithubForkRibbon.new } end context "position option" do it_behaves_like "theme" do let :out do s = <<-EOS <html><head>head<title>title</title></head><body><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style> <!--[if lt IE 9]> <style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.ie.css"}</style> <![endif]--> <div class="github-fork-ribbon-wrapper right" onClick="this.style.display='none'" title="rev"><div class="github-fork-ribbon red"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html> EOS s.strip end subject { Rack::DevMark::Theme::GithubForkRibbon.new(position: 'right') } end end context "color option" do it_behaves_like "theme" do let :out do s = <<-EOS <html><head>head<title>title</title></head><body><style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.css"}</style> <!--[if lt IE 9]> <style>#{read_stylesheet "github-fork-ribbon-css/gh-fork-ribbon.ie.css"}</style> <![endif]--> <div class="github-fork-ribbon-wrapper left" onClick="this.style.display='none'" title="rev"><div class="github-fork-ribbon orange"><span class="github-fork-ribbon-text">env</span></div></div>body</body></html> EOS s.strip end subject { Rack::DevMark::Theme::GithubForkRibbon.new(color: 'orange') } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rack-dev-mark-0.1.3 | spec/rack/dev-mark/theme/github_fork_ribbon_spec.rb |