| 1 |
require "spec_helper" |
| 2 |
|
| 3 |
describe "contrast-switch" do |
| 4 |
before(:all) do |
| 5 |
ParserSupport.parse_file("library/contrast-switch") |
| 6 |
end |
| 7 |
|
| 8 |
context "called with a light base color" do |
| 9 |
it "outputs the dark color" do |
| 10 |
rule = "color: #000;" |
| 11 |
|
| 12 |
expect(".contrast-switch-light-base").to have_ruleset(rule) |
| 13 |
end |
| 14 |
end |
| 15 |
|
| 16 |
context "called with a dark base color" do |
| 17 |
it "outputs the light color" do |
| 18 |
rule = "color: #eee;" |
| 19 |
|
| 20 |
expect(".contrast-switch-dark-base").to have_ruleset(rule) |
| 21 |
end |
| 22 |
end |
| 23 |
end |