| 1 |
require "spec_helper" |
| 2 |
|
| 3 |
describe "fetch-bourbon-setting" do |
| 4 |
before(:all) do |
| 5 |
ParserSupport.parse_file("utilities/fetch-bourbon-setting") |
| 6 |
end |
| 7 |
|
| 8 |
context "fetches the modular-scale-base setting" do |
| 9 |
it "and returns the default value" do |
| 10 |
expect(".test-1").to have_rule("content: 1em") |
| 11 |
end |
| 12 |
end |
| 13 |
|
| 14 |
context "fetches the rails-asset-pipeline setting" do |
| 15 |
it "and returns the user-overridden value" do |
| 16 |
expect(".test-2").to have_rule("content: true") |
| 17 |
end |
| 18 |
end |
| 19 |
|
| 20 |
context "called from the font-face mixin" do |
| 21 |
it "outputs user-overridden font file formats" do |
| 22 |
ruleset = 'font-family: "source-sans-pro"; ' + |
| 23 |
'src: font-url("source-sans-pro-regular.woff2") ' + |
| 24 |
'format("woff2"), ' + |
| 25 |
'font-url("source-sans-pro-regular.woff") ' + |
| 26 |
'format("woff");' |
| 27 |
|
| 28 |
expect("@font-face").to have_ruleset(ruleset) |
| 29 |
end |
| 30 |
end |
| 31 |
end |