[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Running unit tests with rubygems

Johan Nilsson

1/24/2005 2:44:00 PM

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

2 Answers

Chad Fowler

1/24/2005 8:55:00 PM

0

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
>
>

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

Thanks!

--

Chad Fowler
http://chad...
http://rubyc...
http://ruby...
http://rubygems.rub... (over 50,000 gems served!)


Johan Nilsson

1/25/2005 7:22:00 AM

0


"Chad Fowler" <chadfowler@gmail.com> wrote in message
news:a2347a040501241255644173ce@mail.gmail.com...
> On Mon, 24 Jan 2005 23:45:51 +0900, Johan Nilsson
> <johan.nilsson@---.esrange.ssc.se> wrote:
>> 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