super basic tests for CSS::Declare, also dep
[catagits/Web-Simple.git] / t / css_declare.t
diff --git a/t/css_declare.t b/t/css_declare.t
new file mode 100644 (file)
index 0000000..b9bcc23
--- /dev/null
@@ -0,0 +1,25 @@
+use strict; use warnings FATAL => 'all';
+use Test::More qw(no_plan);
+
+{
+
+  package Foo;
+
+  sub foo {
+    use CSS::Declare;
+    eval "color 'red'";
+    [
+       '*' => [ color 'red' ],
+       'tr, td' => [ margin '1px' ],
+    ];
+  }
+}
+
+is(
+   CSS::Declare::to_css_string(Foo::foo()),
+  '* {color:red} tr, td {margin:1px}',
+  'Basic CSS::Declare usage'
+);
+
+ok(!eval "color 'red'", 'Death on use of unimported tag');
+