lib/soundcheck/frameworks.rb in soundcheck-0.2.1 vs lib/soundcheck/frameworks.rb in soundcheck-0.2.2
- old
+ new
@@ -44,11 +44,11 @@
end
def filter(*args)
filter_with(args, {
:is_spec_file => /_spec\.rb$/,
- :is_in_spec_dir => /spec/,
+ :is_in_spec_dir => /^spec/,
:is_dir => lambda {|arg| project.has_dir?(arg) }
})
end
def command(*args)
@@ -89,9 +89,30 @@
def command(*args)
args = (args.empty? ? ["features"] : filter(*args))
return nil if args.empty?
"cucumber #{args.join(" ")}".strip
+ end
+ end
+
+ class RubyCutest
+ include Frameworks::Base
+
+ def present?
+ project.has_file?("Rakefile") and project.file_contents("Rakefile") =~ /Cutest\.run/
+ end
+
+ def filter(*args)
+ filter_with(args, {
+ :is_in_test_dir => /^test\//
+ })
+ end
+
+ def command(*args)
+ args = (args.empty? ? ["test/*.rb"] : filter(*args))
+ return nil if args.empty?
+
+ "cutest #{args.join(" ")}".strip
end
end
class Expresso
include Frameworks::Base