Sha256: 5604d88c68e8f0a5481bad381985af2e32e25f2f2d6171b04be11564a87cb076

Contents?: true

Size: 516 Bytes

Versions: 13

Compression:

Stored size: 516 Bytes

Contents

task :spec do
  arg_files = (ENV["FILES"] && ENV["FILES"].split(/[\s,]+/)) || [ENV["SPEC"]]
  if arg_files
    arg_files.map! { |file_name|
      path = Pathname(file_name.to_s).expand_path
      raise "Spec file not found: #{file_name.inspect}" unless path.exist?
      path.directory? ? path.to_s + "/**/*.rb" : path.to_s
    }
  end

  all_files = Rake::FileList["./spec/**/*_spec.rb"]
  files = arg_files || all_files
  puts "\nRuning tests for: #{ files.join(" ") }\n\n"

  system *["matest"].concat(files)
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
matest-1.6.6 lib/matest/spec_tasks.rb
matest-1.6.5 lib/matest/spec_tasks.rb
matest-1.6.4 lib/matest/spec_tasks.rb
matest-1.6.3 lib/matest/spec_tasks.rb
matest-1.6.2 lib/matest/spec_tasks.rb
matest-1.6.1 lib/matest/spec_tasks.rb
matest-1.6.0 lib/matest/spec_tasks.rb
matest-1.5.6 lib/matest/spec_tasks.rb
matest-1.5.5 lib/matest/spec_tasks.rb
matest-1.5.4 lib/matest/spec_tasks.rb
matest-1.5.3 lib/matest/spec_tasks.rb
matest-1.5.2 lib/matest/spec_tasks.rb
matest-1.5.1 lib/matest/spec_tasks.rb