From ec6c12092ee849f6c7531bb0b6deb506ee98cdde Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 27 Jun 2009 11:28:16 -0700 Subject: [PATCH] Test that serialization of configuration fails when using blocks. --- test/configuration_test.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 27e99ba8..c95ba0fd 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -35,4 +35,32 @@ class ConfigurationTest < Test::Unit::TestCase assert_equal expected_lines, actual_lines end + def test_serialization_fails_with_asset_host_set + contents = <<-CONFIG + asset_host do |path| + "http://example.com" + end + CONFIG + + Compass.configuration.parse_string(contents, "test_serialization_fails_with_asset_host_set") + + assert_raise Compass::Error do + Compass.configuration.serialize + end + end + + def test_serialization_fails_with_asset_cache_buster_set + contents = <<-CONFIG + asset_cache_buster do |path| + "http://example.com" + end + CONFIG + + Compass.configuration.parse_string(contents, "test_serialization_fails_with_asset_cache_buster_set") + + assert_raise Compass::Error do + Compass.configuration.serialize + end + end + end \ No newline at end of file