-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//= require wowstyle | ||
/* vapor css framework */ | ||
|
||
@font-face { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//= require wowscript | ||
/* vapor js framework */ |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# stdlib | ||
require "ostruct" | ||
|
||
|
||
require "spec_helper" | ||
|
||
|
||
module Jekyll::AssetsPlugin | ||
describe Renderer do | ||
|
||
let(:site) do | ||
Jekyll::Site.new Jekyll.configuration({ | ||
"source" => fixtures_path.to_s, | ||
"destination" => @dest.to_s, | ||
"assets" => assets_config | ||
}) | ||
end | ||
|
||
|
||
let(:renderer) do | ||
context = OpenStruct.new(:registers => { :site => site }) | ||
Renderer.new context, "app" | ||
end | ||
|
||
|
||
describe "#render_javascript" do | ||
subject { renderer.render_javascript } | ||
|
||
context "when debug mode enabled" do | ||
let(:assets_config){ Hash[:debug, true] } | ||
it { should match %r{^(\s*<script src="[^"]+"></script>\s*){3}$} } | ||
end | ||
|
||
context "when debug mode disabled" do | ||
let(:assets_config){ Hash[:debug, false] } | ||
it { should match %r{^(\s*<script src="[^"]+"></script>\s*){1}$} } | ||
end | ||
end | ||
|
||
|
||
describe "#render_stylesheet" do | ||
subject { renderer.render_stylesheet } | ||
|
||
context "when debug mode enabled" do | ||
let(:assets_config){ Hash[:debug, true] } | ||
it { should match %r{^(\s*<link rel="stylesheet" href="[^"]+">\s*){3}$} } | ||
end | ||
|
||
context "when debug mode disabled" do | ||
let(:assets_config){ Hash[:debug, false] } | ||
it { should match %r{^(\s*<link rel="stylesheet" href="[^"]+">\s*){1}$} } | ||
end | ||
end | ||
|
||
end | ||
end |