Debian Codegraph @

spec/bourbon/validators/is_number_spec.rb

raw
1 require "spec_helper"
2
3 describe "is-number" do
4 before(:all) do
5 ParserSupport.parse_file("validators/is-number")
6 end
7
8 context "called with integer" do
9 it "is a number" do
10 expect(".integer").to have_rule("line-height: 1")
11 end
12 end
13
14 context "called with px" do
15 it "is a number" do
16 expect(".px").to have_rule("line-height: 2px")
17 end
18 end
19
20 context "called with em" do
21 it "is a number" do
22 expect(".em").to have_rule("line-height: 3em")
23 end
24 end
25
26 context "called with rem" do
27 it "is a number" do
28 expect(".rem").to have_rule("line-height: 4rem")
29 end
30 end
31
32 context "called with percent" do
33 it "is a number" do
34 expect(".percent").to have_rule("line-height: 5%")
35 end
36 end
37
38 context "called with string" do
39 it "is not a number" do
40 expect(".string").to_not have_rule("line-height: \"stringy\"")
41 end
42 end
43 end