From cbad68f19d00620946046440bf6f5f27738ccdbb Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 13 Oct 2015 22:02:16 +0900 Subject: [PATCH] Create shorthand for haml-spec --- Rakefile | 7 +++++++ test/haml-spec/pretty_test.rb | 2 ++ test/haml-spec/ugly_test.rb | 2 ++ 3 files changed, 11 insertions(+) diff --git a/Rakefile b/Rakefile index 0e465504..19fa97aa 100644 --- a/Rakefile +++ b/Rakefile @@ -19,3 +19,10 @@ Rake::TestTask.new do |t| t.verbose = true end task default: :test + +Rake::TestTask.new(:spec) do |t| + t.libs << 'lib' << 'test' + t.ruby_opts = %w[-rtest_helper] + t.test_files = %w[test/haml-spec/ugly_test.rb test/haml-spec/pretty_test.rb] + t.verbose = true +end diff --git a/test/haml-spec/pretty_test.rb b/test/haml-spec/pretty_test.rb index 68dd4491..69d4c781 100644 --- a/test/haml-spec/pretty_test.rb +++ b/test/haml-spec/pretty_test.rb @@ -1,3 +1,5 @@ +$:.unshift File.expand_path('../../test', __dir__) + require 'test_helper' require 'minitest/autorun' diff --git a/test/haml-spec/ugly_test.rb b/test/haml-spec/ugly_test.rb index 7b5ef6c3..1ee7dbe9 100644 --- a/test/haml-spec/ugly_test.rb +++ b/test/haml-spec/ugly_test.rb @@ -1,3 +1,5 @@ +$:.unshift File.expand_path('../../test', __dir__) + require 'test_helper' require 'minitest/autorun'