| 1 |
require "spec_helper" |
| 2 |
|
| 3 |
describe "prefixer" do |
| 4 |
before(:all) do |
| 5 |
ParserSupport.parse_file("library/prefixer") |
| 6 |
end |
| 7 |
|
| 8 |
context "called with no prefixes" do |
| 9 |
it "outputs the spec" do |
| 10 |
rule = "appearance: none;" |
| 11 |
|
| 12 |
expect(".prefix").to have_ruleset(rule) |
| 13 |
end |
| 14 |
end |
| 15 |
|
| 16 |
context "called with one prefix" do |
| 17 |
it "applies the prefix to the property" do |
| 18 |
rule = "-webkit-appearance: none; " + |
| 19 |
"appearance: none;" |
| 20 |
|
| 21 |
expect(".prefix--webkit").to have_ruleset(rule) |
| 22 |
end |
| 23 |
end |
| 24 |
|
| 25 |
context "called with multiple prefixes" do |
| 26 |
it "applies the prefixes to the property" do |
| 27 |
rule = "-moz-appearance: none; " + |
| 28 |
"-ms-appearance: none; " + |
| 29 |
"appearance: none;" |
| 30 |
|
| 31 |
expect(".prefix--moz-ms").to have_ruleset(rule) |
| 32 |
end |
| 33 |
end |
| 34 |
end |