File name of testcases run

Hi, I need to get access to the file name of the testcases I’m running,
it is working using variable $0 but only when running the testcases in
eclipse as Ruby Application but not as test::Unit Test, in this case $0
returns
C:/eclipse/workspace/.metadata/.plugins/org.rubypeople.rdt.testunit/ruby/RemoteTestRunner.rb

How can I get access to the filenames in this case?

FILE??

It’s my understanding that $0 is the name of the program entered on the
command line, and FILE is the relative path(from the initial
directory) of whatever file contains FILE.

well… in my case is a little bit more complicated.
this is my scenario:

The file I’m running: testSuites/fileTestsuite.rb

require ‘testcases/file1’
require ‘testcases/file2’

the file with the testcase1: testcases/file1.rb
require ‘myFramework’
class MyTestCase1 < GenericClass

end

GenericClass in on my myFramework and in that file is where I need to
know that the testcase I’m running is on file testcases/file1.rb

Five years later and no solution :frowning:

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