Fix broken test cases.
This commit is contained in:
parent
3a6481d2d5
commit
f3fb895a32
@ -38,7 +38,7 @@ module Compass
|
||||
end
|
||||
|
||||
def comment_for_preferred_syntax
|
||||
if top_level.preferred_syntax == :scss
|
||||
if top_level.preferred_syntax == :scss && top_level.sass_dir
|
||||
%Q{
|
||||
# If you prefer the indented syntax, you might want to regenerate this
|
||||
# project again passing --syntax sass, or you can uncomment this:
|
||||
|
@ -21,11 +21,10 @@ class CommandLineTest < Test::Unit::TestCase
|
||||
def test_basic_install
|
||||
within_tmp_directory do
|
||||
compass "--boring", "basic"
|
||||
assert File.exists?("basic/src/screen.scss")
|
||||
assert File.exists?("basic/sass/screen.scss")
|
||||
assert File.exists?("basic/stylesheets/screen.css")
|
||||
assert_action_performed :directory, "basic/"
|
||||
assert_action_performed :create, "basic/src/screen.scss"
|
||||
assert_action_performed :compile, "basic/src/screen.scss"
|
||||
assert_action_performed :create, "basic/sass/screen.scss"
|
||||
assert_action_performed :create, "basic/stylesheets/screen.css"
|
||||
end
|
||||
end
|
||||
@ -35,11 +34,10 @@ class CommandLineTest < Test::Unit::TestCase
|
||||
define_method "test_#{framework.name}_installation" do
|
||||
within_tmp_directory do
|
||||
compass *%W(--boring --framework #{framework.name} #{framework.name}_project)
|
||||
assert File.exists?("#{framework.name}_project/src/screen.scss"), "src/screen.scss is missing. Found: #{Dir.glob("#{framework.name}_project/**/*").join(", ")}"
|
||||
assert File.exists?("#{framework.name}_project/sass/screen.scss"), "sass/screen.scss is missing. Found: #{Dir.glob("#{framework.name}_project/**/*").join(", ")}"
|
||||
assert File.exists?("#{framework.name}_project/stylesheets/screen.css")
|
||||
assert_action_performed :directory, "#{framework.name}_project/"
|
||||
assert_action_performed :create, "#{framework.name}_project/src/screen.scss"
|
||||
assert_action_performed :compile, "#{framework.name}_project/src/screen.scss"
|
||||
assert_action_performed :create, "#{framework.name}_project/sass/screen.scss"
|
||||
assert_action_performed :create, "#{framework.name}_project/stylesheets/screen.css"
|
||||
end
|
||||
end
|
||||
@ -51,10 +49,9 @@ class CommandLineTest < Test::Unit::TestCase
|
||||
Dir.chdir "basic" do
|
||||
# basic update with timestamp caching
|
||||
compass "--boring"
|
||||
assert_action_performed :unchanged, "src/screen.scss"
|
||||
assert_action_performed :unchanged, "sass/screen.scss"
|
||||
# basic update with force option set
|
||||
compass "--force", "--boring"
|
||||
assert_action_performed :compile, "src/screen.scss"
|
||||
assert_action_performed :identical, "stylesheets/screen.css"
|
||||
end
|
||||
end
|
||||
|
@ -24,6 +24,14 @@ class ConfigurationTest < Test::Unit::TestCase
|
||||
output_style = :nested
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
# relative_assets = true
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
# line_comments = false
|
||||
|
||||
# If you prefer the indented syntax, you might want to regenerate this
|
||||
# project again passing --syntax sass, or you can uncomment this:
|
||||
# preferred_syntax = :sass
|
||||
# and then run:
|
||||
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
||||
CONFIG
|
||||
|
||||
Compass.add_configuration(contents, "test_parse")
|
||||
@ -90,9 +98,13 @@ project_path = "/home/chris/my_compass_project"
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
css_dir = "css"
|
||||
# You can select your preferred output style here (can be overridden via the command line):
|
||||
# output_style = :expanded or :nested or :compact or :compressed
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
# relative_assets = true
|
||||
additional_import_paths = ["../foo", "/path/to/my/framework"]
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
# line_comments = false
|
||||
EXPECTED
|
||||
assert_equal "/", Compass.configuration.http_path
|
||||
assert_equal expected_serialization.split("\n"), Compass.configuration.serialize.split("\n")
|
||||
@ -120,9 +132,13 @@ project_path = "/home/chris/my_compass_project"
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
css_dir = "css"
|
||||
# You can select your preferred output style here (can be overridden via the command line):
|
||||
# output_style = :expanded or :nested or :compact or :compressed
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
# relative_assets = true
|
||||
additional_import_paths = ["../foo", "/path/to/my/framework"]
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
# line_comments = false
|
||||
EXPECTED
|
||||
assert_equal "/", Compass.configuration.http_path
|
||||
assert_equal expected_serialization.split("\n"), Compass.configuration.serialize.split("\n")
|
||||
@ -142,9 +158,13 @@ EXPECTED
|
||||
# Require any additional compass plugins here.
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
# You can select your preferred output style here (can be overridden via the command line):
|
||||
# output_style = :expanded or :nested or :compact or :compressed
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
# relative_assets = true
|
||||
sass_options = {:foo=>"bar"}
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
# line_comments = false
|
||||
EXPECTED
|
||||
|
||||
assert_equal expected_serialization, Compass.configuration.serialize
|
||||
|
16
test/fixtures/stylesheets/compass/css/lists.css
vendored
16
test/fixtures/stylesheets/compass/css/lists.css
vendored
@ -16,7 +16,9 @@ ul.horizontal {
|
||||
padding-right: 4px; }
|
||||
ul.horizontal li:first-child, ul.horizontal li.first {
|
||||
padding-left: 0; }
|
||||
ul.horizontal li:last-child, ul.horizontal li.last {
|
||||
ul.horizontal li:last-child {
|
||||
padding-right: 0; }
|
||||
ul.horizontal li.last {
|
||||
padding-right: 0; }
|
||||
|
||||
ul.wide-horizontal {
|
||||
@ -37,7 +39,9 @@ ul.wide-horizontal {
|
||||
padding-right: 10px; }
|
||||
ul.wide-horizontal li:first-child, ul.wide-horizontal li.first {
|
||||
padding-left: 0; }
|
||||
ul.wide-horizontal li:last-child, ul.wide-horizontal li.last {
|
||||
ul.wide-horizontal li:last-child {
|
||||
padding-right: 0; }
|
||||
ul.wide-horizontal li.last {
|
||||
padding-right: 0; }
|
||||
|
||||
ul.right-horizontal {
|
||||
@ -58,7 +62,9 @@ ul.right-horizontal {
|
||||
padding-right: 4px; }
|
||||
ul.right-horizontal li:first-child, ul.right-horizontal li.first {
|
||||
padding-right: 0; }
|
||||
ul.right-horizontal li:last-child, ul.right-horizontal li.last {
|
||||
ul.right-horizontal li:last-child {
|
||||
padding-left: 0; }
|
||||
ul.right-horizontal li.last {
|
||||
padding-left: 0; }
|
||||
|
||||
ul.no-padding {
|
||||
@ -133,7 +139,9 @@ ul.comma {
|
||||
display: inline; }
|
||||
ul.comma li:after {
|
||||
content: ", "; }
|
||||
ul.comma li:last-child:after, ul.comma li.last:after {
|
||||
ul.comma li:last-child:after {
|
||||
content: ""; }
|
||||
ul.comma li.last:after {
|
||||
content: ""; }
|
||||
|
||||
ul.no-bullets {
|
||||
|
Loading…
Reference in New Issue
Block a user