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:
parent
f663eb664b
commit
268f8782a7
4 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
1
test/sass/results/options.css
Normal file
1
test/sass/results/options.css
Normal file
|
@ -0,0 +1 @@
|
|||
foo { style: compact; }
|
2
test/sass/templates/options.sass
Normal file
2
test/sass/templates/options.sass
Normal file
|
@ -0,0 +1,2 @@
|
|||
foo
|
||||
style= option("style")
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue