Forum: Ruby on Rails unit tests executed for every page load ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Gernot K. (Guest)
on 2006-03-13 18:45
After I installed the very sweet file_column plugin I get strange output
on my html pages. At the very end I always get something like this:

"Loaded suite dispatch.cgi Started Finished in 0.000218 seconds. 0
tests, 0 assertions, 0 failures, 0 errors "

Seems like there is executed a non existent test suite for every page
load. Can anybody help me find the lines that force this behaviour ?

Thanks

Gernot K.
Jonathan V. (Guest)
on 2006-03-14 00:07
(Received via mailing list)
You only have to require 'test/unit' for that to happen, not actually
define
any test suites. If you can't figure out where/why it is being required,
set
Test::Unit.run = true and it won't run automatically like you are
seeing.

-Jonathan.
Nithin R. (Guest)
on 2006-03-20 20:48
(Received via mailing list)
Thanks Jonathan!

To be more specific, I included this line in config/environment.rb
(after the "Include your application configuration below comment):
Test::Unit.run = true

- Nithin
Mayank Jain (Guest)
on 2006-04-10 18:35
I had the same issue.

If you modify the init.rb that came with the plugin (file_column) to
comment out the line "require 'test_case', it fixes the problem.

The init.rb would then look like this:

# plugin init file for rails
# this file will be picked up by rails automatically and
# add the file_column extensions to rails

require 'file_column'
require 'file_compat'
require 'file_column_helper'
require 'validations'
#require 'test_case'

ActiveRecord::Base.send(:include, FileColumn)
ActionView::Base.send(:include, FileColumnHelper)
ActiveRecord::Base.send(:include, FileColumn::Validations)

Mayank

Nithin R. wrote:
> Thanks Jonathan!
>
> To be more specific, I included this line in config/environment.rb
> (after the "Include your application configuration below comment):
> Test::Unit.run = true
>
> - Nithin
This topic is locked and can not be replied to.