1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] Test case to make sure options get passed from the plugin to the stylesheet environment.

Conflicts:

	test/test_helper.rb
This commit is contained in:
Chris Eppstein 2010-01-20 20:30:14 -08:00
parent f663eb664b
commit 268f8782a7
4 changed files with 8 additions and 0 deletions

View file

@ -7,6 +7,7 @@ class SassPluginTest < Test::Unit::TestCase
@@templates = %w{
complex script parent_ref import alt
subdir/subdir subdir/nested_subdir/nested_subdir
options
}
def setup

View file

@ -0,0 +1 @@
foo { style: compact; }

View file

@ -0,0 +1,2 @@
foo
style= option("style")

View file

@ -12,6 +12,10 @@ Sass::RAILS_LOADED = true unless defined?(Sass::RAILS_LOADED)
module Sass::Script::Functions
module UserFunctions; end
include UserFunctions
def option(name)
Sass::Script::String.new(@options[name.value.to_sym].to_s)
end
end
class Test::Unit::TestCase