diff options
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 42ead2c..7615fdd 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -64,3 +64,16 @@ def hit(uris) return results end + +# process_based_port provides a port number, usable for TCP and UDP +# connections based on $$ and with a 5000 as base. +# this is required if you perform several builds of mongrel in parallel +# (like continuous integration systems) +def process_based_port + 5000 + $$ % 1000 +end + +# Platform check helper ;-) +def windows? + result = RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/ +end
\ No newline at end of file |