Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Commit

Permalink
Add test for sass import bug
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Oct 31, 2012
1 parent 36edf5e commit 4f7b5a0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/fixtures/sass/_colors.scss
@@ -0,0 +1,2 @@
$link: "red";
$header: 'blue';
3 changes: 3 additions & 0 deletions test/fixtures/sass/_header.scss
@@ -0,0 +1,3 @@
#header {
color: $header;
}
5 changes: 5 additions & 0 deletions test/fixtures/sass/links.scss
@@ -0,0 +1,5 @@
@import "colors";

a:link {
color: $link;
}
2 changes: 2 additions & 0 deletions test/fixtures/sass/main.scss
@@ -0,0 +1,2 @@
$header: 'blue';
@import "header";
14 changes: 14 additions & 0 deletions test/test_sass.rb
Expand Up @@ -199,6 +199,20 @@ def render(path)
end end
end end


test "reference @import'd variable" do
assert_equal <<-EOS, render('sass/links.scss')
a:link {
color: "red"; }
EOS
end

test "@import reference variable" do
assert_equal <<-EOS, render('sass/main.scss')
#header {
color: "blue"; }
EOS
end

def silence_warnings def silence_warnings
old_verbose, $VERBOSE = $VERBOSE, false old_verbose, $VERBOSE = $VERBOSE, false
yield yield
Expand Down

0 comments on commit 4f7b5a0

Please sign in to comment.