spec/integration_spec.rb in parallel_tests-0.7.0.alpha2 vs spec/integration_spec.rb in parallel_tests-0.7.0.rc1
- old
+ new
@@ -141,9 +141,19 @@
}
result = run_tests("spec", :export => "PARALLEL_TEST_PROCESSORS=#{processes}", :processes => processes)
result.scan(/ENV-.?-/).should =~ ["ENV--", "ENV-2-", "ENV-3-", "ENV-4-", "ENV-5-"]
end
+ it "filters test by given pattern and relative paths" do
+ write "spec/x_spec.rb", "puts 'XXX'"
+ write "spec/y_spec.rb", "puts 'YYY'"
+ write "spec/z_spec.rb", "puts 'ZZZ'"
+ result = run_tests("spec", :add => '-p "^spec/(x|z)"')
+ result.should include('XXX')
+ result.should_not include('YYY')
+ result.should include('ZZZ')
+ end
+
context "Test::Unit" do
it "runs" do
write "test/x1_test.rb", "require 'test/unit'; class XTest < Test::Unit::TestCase; def test_xxx; end; end"
result = run_tests("test", :type => :test)
result.should include('1 test')