summaryrefslogtreecommitdiff
blob: de41fb066f07653f1be61698d91a7f436071bd16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
commit b5bc740c12024df855991ae7437ef2df113d1ab3
Author: Simon Rozet <simon@rozet.name>
Date:   Wed May 12 07:11:05 2010 +0200

    fix test for haml 3

diff --git a/test/sass_test.rb b/test/sass_test.rb
index 200554c..596e3c4 100644
--- a/test/sass_test.rb
+++ b/test/sass_test.rb
@@ -13,21 +13,21 @@ class SassTest < Test::Unit::TestCase
   end
 
   it 'renders inline Sass strings' do
-    sass_app { sass "#sass\n  :background-color #FFF\n" }
+    sass_app { sass "#sass\n  :background-color white\n" }
     assert ok?
-    assert_equal "#sass {\n  background-color: #FFF; }\n", body
+    assert_equal "#sass {\n  background-color: white; }\n", body
   end
 
   it 'renders .sass files in views path' do
     sass_app { sass :hello }
     assert ok?
-    assert_equal "#sass {\n  background-color: #FFF; }\n", body
+    assert_equal "#sass {\n  background-color: white; }\n", body
   end
 
   it 'ignores the layout option' do
     sass_app { sass :hello, :layout => :layout2 }
     assert ok?
-    assert_equal "#sass {\n  background-color: #FFF; }\n", body
+    assert_equal "#sass {\n  background-color: white; }\n", body
   end
 
   it "raises error if template not found" do
@@ -39,44 +39,50 @@ class SassTest < Test::Unit::TestCase
 
   it "passes SASS options to the Sass engine" do
     sass_app {
-      sass "#sass\n  :background-color #FFF\n  :color #000\n", :style => :compact
+      sass "#sass\n  :background-color white\n  :color black\n",
+        :style => :compact
     }
     assert ok?
-    assert_equal "#sass { background-color: #FFF; color: #000; }\n", body
+    assert_equal "#sass { background-color: white; color: black; }\n", body
   end
 
   it "passes default SASS options to the Sass engine" do
     mock_app {
       set :sass, {:style => :compact} # default Sass style is :nested
       get '/' do
-        sass "#sass\n  :background-color #FFF\n  :color #000\n"
+        sass "#sass\n  :background-color white\n  :color black\n"
       end
     }
     get '/'
     assert ok?
-    assert_equal "#sass { background-color: #FFF; color: #000; }\n", body
+    assert_equal "#sass { background-color: white; color: black; }\n", body
   end
 
-  it "merges the default SASS options with the overrides and passes them to the Sass engine" do
+  it "merges the default SASS options with the overrides" do
     mock_app {
-      set :sass, {:style => :compact, :attribute_syntax => :alternate } # default Sass attribute_syntax is :normal (with : in front)
+      # default Sass attribute_syntax is :normal (with : in front)
+      set :sass, {:style => :compact, :attribute_syntax => :alternate }
       get '/' do
-        sass "#sass\n  background-color: #FFF\n  color: #000\n"
+        sass "#sass\n  background-color: white\n  color: black\n"
       end
       get '/raised' do
-        sass "#sass\n  :background-color #FFF\n  :color #000\n", :style => :expanded # retains global attribute_syntax settings
+        # retains global attribute_syntax settings
+        sass "#sass\n  :background-color white\n  :color black\n",
+          :style => :expanded
       end
       get '/expanded_normal' do
-        sass "#sass\n  :background-color #FFF\n  :color #000\n", :style => :expanded, :attribute_syntax => :normal
+        sass "#sass\n  :background-color white\n  :color black\n",
+          :style => :expanded, :attribute_syntax => :normal
       end
     }
     get '/'
     assert ok?
-    assert_equal "#sass { background-color: #FFF; color: #000; }\n", body
+    assert_equal "#sass { background-color: white; color: black; }\n", body
     assert_raise(Sass::SyntaxError) { get('/raised') }
     get '/expanded_normal'
     assert ok?
-    assert_equal "#sass {\n  background-color: #FFF;\n  color: #000;\n}\n", body
+    assert_equal "#sass {\n  background-color: white;\n  color: black;\n}\n",
+      body
   end
 end
 
diff --git a/test/views/hello.sass b/test/views/hello.sass
index 5a4fd57..090bd4a 100644
--- a/test/views/hello.sass
+++ b/test/views/hello.sass
@@ -1,2 +1,2 @@
 #sass
-  :background-color #FFF
+  :background-color white