mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
36 lines
516 B
Ruby
36 lines
516 B
Ruby
![]() |
#!/usr/bin/env ruby
|
||
|
require File.dirname(__FILE__) + '/test_helper'
|
||
|
|
||
|
class ScssTest < Test::Unit::TestCase
|
||
|
include ScssTestHelper
|
||
|
|
||
|
def test_nested_rules
|
||
|
assert_equal <<CSS, render(<<SCSS)
|
||
|
foo bar {
|
||
|
a: b; }
|
||
|
CSS
|
||
|
foo {bar {a: b}}
|
||
|
SCSS
|
||
|
assert_equal <<CSS, render(<<SCSS)
|
||
|
foo bar {
|
||
|
a: b; }
|
||
|
foo baz {
|
||
|
b: c; }
|
||
|
CSS
|
||
|
foo {
|
||
|
bar {a: b}
|
||
|
baz {b: c}}
|
||
|
SCSS
|
||
|
assert_equal <<CSS, render(<<SCSS)
|
||
|
foo bar baz {
|
||
|
a: b; }
|
||
|
foo bang bip {
|
||
|
a: b; }
|
||
|
CSS
|
||
|
foo {
|
||
|
bar {baz {a: b}}
|
||
|
bang {bip {a: b}}}
|
||
|
SCSS
|
||
|
end
|
||
|
end
|