aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/libsass.rb38
1 files changed, 18 insertions, 20 deletions
diff --git a/Library/Formula/libsass.rb b/Library/Formula/libsass.rb
index 7095fc0d5..005101446 100644
--- a/Library/Formula/libsass.rb
+++ b/Library/Formula/libsass.rb
@@ -10,27 +10,25 @@ class Libsass < Formula
system "make install"
end
- def test
- mktemp do
- (Pathname.pwd/"test.c").write <<-EOS.undent
- #include <sass_interface.h>
- #include <string.h>
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <sass_interface.h>
+ #include <string.h>
- int main()
- {
- struct sass_context* sass_ctx = sass_new_context();
- sass_ctx->source_string = "a { color:blue; &:hover { color:red; } }";
- sass_ctx->options.output_style = SASS_STYLE_NESTED;
- sass_compile(sass_ctx);
- if(sass_ctx->error_status) {
- return 1;
- } else {
- return strcmp(sass_ctx->output_string, "a {\\n color: blue; }\\n a:hover {\\n color: red; }\\n") != 0;
- }
+ int main()
+ {
+ struct sass_context* sass_ctx = sass_new_context();
+ sass_ctx->source_string = "a { color:blue; &:hover { color:red; } }";
+ sass_ctx->options.output_style = SASS_STYLE_NESTED;
+ sass_compile(sass_ctx);
+ if(sass_ctx->error_status) {
+ return 1;
+ } else {
+ return strcmp(sass_ctx->output_string, "a {\\n color: blue; }\\n a:hover {\\n color: red; }\\n") != 0;
}
- EOS
- system ENV.cc, "-o", "test", "test.c", "-lsass"
- system "./test"
- end
+ }
+ EOS
+ system ENV.cc, "-o", "test", "test.c", "-lsass"
+ system "./test"
end
end