spec/integration_spec.rb in parallel_tests-0.6.7 vs spec/integration_spec.rb in parallel_tests-0.6.8
- old
+ new
@@ -47,9 +47,16 @@
result.scan(/Finished in \d+\.\d+ seconds/).size.should == 2
result.scan(/Took \d+\.\d+ seconds/).size.should == 1 # parallel summary
$?.success?.should == true
end
+ it "does not run any tests if there are none" do
+ write 'spec/xxx.rb', 'xxx'
+ result = run_tests
+ result.should include('No examples found')
+ result.should include('Took')
+ end
+
it "fails when tests fail" do
write 'spec/xxx_spec.rb', 'describe("it"){it("should"){puts "TEST1"}}'
write 'spec/xxx2_spec.rb', 'describe("it"){it("should"){1.should == 2}}'
result = run_tests