spec/integration_spec.rb in parallel_tests-1.0.8 vs spec/integration_spec.rb in parallel_tests-1.0.9

- old
+ new

@@ -112,9 +112,18 @@ result.should_not =~ /TEST1.*TEST2.*TEST1/m result.should_not =~ /TEST2.*TEST1.*TEST2/m end + it "can serialize stdout and stderr" do + write 'spec/xxx_spec.rb', '5.times{describe("it"){it("should"){sleep 0.01; $stderr.puts "errTEST1"; puts "TEST1"}}}' + write 'spec/xxx2_spec.rb', 'sleep 0.01; 5.times{describe("it"){it("should"){sleep 0.01; $stderr.puts "errTEST2"; puts "TEST2"}}}' + result = run_tests "spec", :type => 'rspec', :add => "--serialize-stdout --combine-stderr" + + result.should_not =~ /TEST1.*TEST2.*TEST1/m + result.should_not =~ /TEST2.*TEST1.*TEST2/m + end + context "with given commands" do it "can exec given commands with ENV['TEST_ENV_NUM']" do result = `#{executable} -e 'ruby -e "print ENV[:TEST_ENV_NUMBER.to_s].to_i"' -n 4` result.gsub('"','').split('').sort.should == %w[0 2 3 4] end