Running unit tests with rubygems

Hi,

I've finally managed to create a .gemspec and successfully build/install my first Rubygem (including prebuilt Win32 binaries - kudos to Jim Weirich for his help).

However I can't seem to get the unit tests to run; the are all located under tests/, and there's a master test suite in tests/ts_all.rb. All test files seems to be installed correctly, but when I either try to execute 'gem install <mylib> -t' or, after the installation, 'gem check <mylib> --test' the following error appears:

···

------------------------
D:\Data\ruby\rbelib>gem check rbelib --test
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:26:in `require': No such file to load -- tests/ts_all.rb (
adError)
        from D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/validator.rb:128:in `unit_test'
        from D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/validator.rb:128:in `each'
        from D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/validator.rb:128:in `unit_test'
        from D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:248:in `execute'
        from D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/command.rb:49:in `invoke'
        from D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:90:in `process_args'
        from D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:63:in `run'
        from D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:9:in `run'
        from D:/Tools/Ruby1.8.2-14/bin/gem:11
-------------------------

Any helpers?

Johan

Johan, can you provide a pointer to an archive of all this? I'd like
to try it myself.

Thanks!

···

On Mon, 24 Jan 2005 23:45:51 +0900, Johan Nilsson <johan.nilsson@---.esrange.ssc.se> wrote:

Hi,

I've finally managed to create a .gemspec and successfully build/install my
first Rubygem (including prebuilt Win32 binaries - kudos to Jim Weirich for
his help).

However I can't seem to get the unit tests to run; the are all located under
tests/, and there's a master test suite in tests/ts_all.rb. All test files
seems to be installed correctly, but when I either try to execute 'gem
install <mylib> -t' or, after the installation, 'gem check <mylib> --test'
the following error appears:

------------------------
D:\Data\ruby\rbelib>gem check rbelib --test
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:26:in
`require': No such file to load -- tests/ts_all.rb (
adError)
        from
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/validator.rb:128:in
`unit_test'
        from
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/validator.rb:128:in
`each'
        from
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/validator.rb:128:in
`unit_test'
        from
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:248:in
`execute'
        from
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/command.rb:49:in
`invoke'
        from
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:90:in
`process_args'
        from
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:63:in
`run'
        from
D:/Tools/Ruby1.8.2-14/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:9:in
`run'
        from D:/Tools/Ruby1.8.2-14/bin/gem:11
-------------------------

Any helpers?

Johan

--

Chad Fowler
http://chadfowler.com

http://rubygems.rubyforge.org (over 50,000 gems served!)

"Chad Fowler" <chadfowler@gmail.com> wrote in message news:a2347a040501241255644173ce@mail.gmail.com...

Hi,

[snip]

Johan, can you provide a pointer to an archive of all this? I'd like
to try it myself.

Would it be ok if I send the built gem to you directly as an e-mail attachment instead?

// Johan

···

On Mon, 24 Jan 2005 23:45:51 +0900, Johan Nilsson > <johan.nilsson@---.esrange.ssc.se> wrote: