Test Unit error when requiring proctable

Hi there, apologies if I am asking in the wrong forum.

I am trying to add a method to my test suite that uses the proctable
class to read process ids.
I installed using “gem install sys-proctable”

I then placed require ‘sys/proctable.rb’ in a subclass from the test

So I have for eg in test_file.rb
require ‘source/core/Browser’
test details etc…

In Browser.rb, I have
require ‘sys/proctable.rb’

require ‘time’
gem ‘watir’, “1.5.3”
require ‘watir/dialog’
require ‘watir/WindowHelper’
require ‘watir/contrib/enabled_popup’
require ‘watir/contrib/ie-new-process’

When I try to execute the test, I get an error
uninitialized constant Test::Unit::UI::NORMAL (NameError)

The test loads correctly if I comment out require ‘sys/proctable.rb’.

Any help/hints would be appreciated


Any help/hints would be appreciated

Change require order maybe?

Roger P. wrote:

Change require order maybe?

Yeah, tried that, but no luck.

Actually, it works now. I set up proctable in a new module, and
required that module in TestDefaults, and all is good in the world.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs