Permalink
Browse files

add integration test

  • Loading branch information...
1 parent 38ac4d1 commit 183e17745193001ea9465a3356ff8fdbed741cd2 @grosser committed Feb 1, 2012
Showing with 25 additions and 1 deletion.
  1. +25 −1 spec/parallel_split_test_spec.rb
@@ -53,7 +53,31 @@ def parallel_split_test(x)
end
describe "running tests" do
-
+ describe "running tests" do
+ describe "RSpec" do
+ it "runs a rspec file in parallel" do
+ write "xxx_spec.rb", <<-RUBY.unindent
+ describe "X" do
+ it "a" do
+ puts "it-ran-a-in-#{ENV['TEST_ENV_NUMBER'].to_i}-"
+ end
+
+ it "b" do
+ puts "it-ran-b-in-#{ENV['TEST_ENV_NUMBER'].to_i}-"
+ end
+ end
+ RUBY
+
+ result = parallel_split_test "xxx_spec.rb"
+ result.should =~ /it-ran-a-in-(\d)-/
+ process_of_a = $1
+ result.should =~ /it-ran-b-in-(\d)-/
+ process_of_b = $1
+
+ process_of_a.should_not == process_of_b
+ end
+ end
+ end
end
end
end

0 comments on commit 183e177

Please sign in to comment.