Debian Codegraph @

spec/bourbon/library/modular_scale_spec.rb

raw
1 require "spec_helper"
2
3 describe "modular-scale" do
4 before(:all) do
5 ParserSupport.parse_file("library/modular-scale")
6 end
7
8 context "called with arguments (1, $value: 2em)" do
9 it "outputs double the first value from the default scale" do
10 expect(".one-base-two").to have_rule("font-size: 2.5em")
11 end
12 end
13
14 context "called with arguments (1, $value: 3em)" do
15 it "outputs triple the first value from the default scale" do
16 expect(".one-base-three").to have_rule("font-size: 3.75em")
17 end
18 end
19
20 context "called with arguments (1, $value: 4em 6em)" do
21 it "outputs quadruple the first value from the default scale" do
22 expect(".one-double-value").to have_rule("font-size: 1.024em")
23 end
24 end
25
26 context "called with arguments (1, $ratio: $golden-ratio)" do
27 it "output the first value from the golden ratio scale" do
28 expect(".one-golden-ratio").to have_rule("font-size: 1.618em")
29 end
30 end
31
32 context "called with argument (2)" do
33 it "outputs the second value from the default scale" do
34 expect(".two-base-one").to have_rule("font-size: 1.5625em")
35 end
36 end
37
38 context "called with arguments (2, $value: 4em 6em)" do
39 it "outputs sextuple the second value from the default scale" do
40 expect(".two-double-value").to have_rule("font-size: 3.125em")
41 end
42 end
43 end