test/test_serialization.rb in crass-1.0.0 vs test/test_serialization.rb in crass-1.0.1

- old
+ new

@@ -24,6 +24,22 @@ css = '@charset "utf-8";' tree = Crass.parse(css) assert_equal(css, CP.stringify(tree)) end + + it "should reflect modifications made to the block of an `:at_rule`" do + tree = Crass.parse(%[ + @media (screen) { + .froggy { color: green; } + .piggy { color: pink; } + } + ].strip) + + tree[0][:block] = Crass::Parser.parse_rules(".piggy { color: pink; }") + + assert_equal( + "@media (screen) {.piggy { color: pink; }}", + Crass::Parser.stringify(tree) + ) + end end