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.
64df72aa2735f96f380d3efe2d54afd1?d=identicon&s=25 Gernot Kogler (Guest)
on 2006-03-13 17: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 Kogler
631d1677786f0725da6ccee46043686e?d=identicon&s=25 Jonathan Viney (Guest)
on 2006-03-13 23: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.
720fde074c77f4c9692dd6f05802d581?d=identicon&s=25 Nithin Reddy (jashugan)
on 2006-03-20 19: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
2cf644618ea92d7929e46ccafc17c15c?d=identicon&s=25 Mayank Jain (Guest)
on 2006-04-10 16: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 Reddy 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.