Ryan Davis
8/14/2007 5:36:00 AM
On Aug 13, 2007, at 22:04 , richpoirier@gmail.com wrote:
> Is rake supposed to be really slow?
no, not that it is supposed to be really fast... but it isn't what
gets in your way.
> ...
> C:/InstantRails/ruby/bin/ruby -Ilib;test "C:/InstantRails/ruby/lib/
> ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake_test_loader.rb" "test/
> unit/
> user_test.rb"
My guess is that your test is slow. To start, take rake out of the
equation:
ruby -rtest/unit test/unit/user_test.rb
After that, you can do something simple like:
def setup
@start_time = Time.now
end
def teardown
puts "** TIME: #{self.name} : #{Time.now - @start_time} seconds
end
And see what's going so slow a little clearer.
> Anyone else have this problem or is it normal? Thanks.
I run thousands of tests/assertions in just seconds many times a day:
ruby: Finished in 0.105172 seconds. 252 tests, 735 assertions, 0
failures, 0 errors
ruby: Finished in 1.275824 seconds. 750 tests, 2220 assertions, 0
failures, 0 errors
rails: Finished in 81.681246 seconds. 1924 tests, 12195 assertions, 0
failures, 0 errors