tests no longer working

View: New views
4 Messages — Rating Filter:   Alert me  

tests no longer working

by jnedzel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Folks:

I've been working on tests for the last few days.  Everything was
working fine.  Today, however, they stopped working.  No matter what I
do, when I try to run unit tests, no tests are actually run.  For
example, I have the following file:

require File.dirname(__FILE__) + '/../test_helper'

class ResultTest < ActiveSupport::TestCase
   def test_truth
     assert true
   end
end

I run this by using the pop-up menu and selecting test.  The output is
as follows:

--------------

JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Loaded suite
/Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/result_test
Started

Finished in 0.0010 seconds.

0 tests, 0 assertions, 0 failures, 0 errors

--------------

There is one test in this file and one assertion, so something is wrong.

I'm using NetBeans 6.1, Built-in JRuby 1.8.6 (2008-03-31 patchlevel
6360) [java]

Any ideas?

--
Jared Nedzel
Cancer Genomics Informatics
Broad Institute
7 Cambridge Center
Cambridge, MA 02142

617-324-4825
jnedzel@...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: tests no longer working

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jared,

Could you try whether you're able to run tests using native Ruby instead
of JRuby? Also, does it work if you run it from the command line, e.g.
just 'ruby test/unit/your_test.rb' and with JRuby 'jruby -S
test/unit/your_test.rb'? Lastly, it could a load path issue, there are
some fixes with regard to that in 6.5 dev builds, so it would be great
if you could try the latest build available at
http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/ 
and let us know whether the issue still exists.

Thanks,
Erno


Jared Nedzel wrote:

> Folks:
>
> I've been working on tests for the last few days.  Everything was
> working fine.  Today, however, they stopped working.  No matter what I
> do, when I try to run unit tests, no tests are actually run.  For
> example, I have the following file:
>
> require File.dirname(__FILE__) + '/../test_helper'
>
> class ResultTest < ActiveSupport::TestCase
>   def test_truth
>     assert true
>   end
> end
>
> I run this by using the pop-up menu and selecting test.  The output is
> as follows:
>
> --------------
>
> JRuby limited openssl loaded. gem install jruby-openssl for full support.
> http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
> Loaded suite
> /Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/result_test
>
> Started
>
> Finished in 0.0010 seconds.
>
> 0 tests, 0 assertions, 0 failures, 0 errors
>
> --------------
>
> There is one test in this file and one assertion, so something is wrong.
>
> I'm using NetBeans 6.1, Built-in JRuby 1.8.6 (2008-03-31 patchlevel
> 6360) [java]
>
> Any ideas?
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: tests no longer working

by jnedzel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Erno:

It behaved the same when running from the command-line with JRuby.  I
upgraded my Rails install so that I could run it with native Ruby.
Changing to native Ruby, I got an understandable walk-back.  One of my
classes had incorrect code:

class Well < ActiveRecord::Base
   belongs_to :user, :plate, :bead_set

This should be:

   belongs_to :user
   belongs_to :plate
   belongs_to :bead_set

It appears that for some reason JRuby was swallowing the walkback.

/Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/app/models/well.rb:12:in
`belongs_to': wrong number of arguments (3 for 2) (ArgumentError)
         from
/Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/app/models/well.rb:12
         from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
         from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
         from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require'
         from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
         from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require'
         from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:104:in
`require_or_load'
         from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:60:in
`depend_on'
         from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:442:in
`require_dependency'
         from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/fixtures.rb:872:in
`require_fixture_classes'
         from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/fixtures.rb:868:in
`each'
         from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/fixtures.rb:868:in
`require_fixture_classes'
         from
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/fixtures.rb:863:in
`fixtures'
         from
/Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/../test_helper.rb:35
         from
/Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/result_test.rb:1:in
`require'
         from
/Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/result_test.rb:1


Jared

Erno Mononen wrote:

> Hi Jared,
>
> Could you try whether you're able to run tests using native Ruby instead
> of JRuby? Also, does it work if you run it from the command line, e.g.
> just 'ruby test/unit/your_test.rb' and with JRuby 'jruby -S
> test/unit/your_test.rb'? Lastly, it could a load path issue, there are
> some fixes with regard to that in 6.5 dev builds, so it would be great
> if you could try the latest build available at
> http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/ 
> and let us know whether the issue still exists.
>
> Thanks,
> Erno
>
>
> Jared Nedzel wrote:
>> Folks:
>>
>> I've been working on tests for the last few days.  Everything was
>> working fine.  Today, however, they stopped working.  No matter what I
>> do, when I try to run unit tests, no tests are actually run.  For
>> example, I have the following file:
>>
>> require File.dirname(__FILE__) + '/../test_helper'
>>
>> class ResultTest < ActiveSupport::TestCase
>>   def test_truth
>>     assert true
>>   end
>> end
>>
>> I run this by using the pop-up menu and selecting test.  The output is
>> as follows:
>>
>> --------------
>>
>> JRuby limited openssl loaded. gem install jruby-openssl for full support.
>> http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
>> Loaded suite
>> /Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/result_test
>>
>> Started
>>
>> Finished in 0.0010 seconds.
>>
>> 0 tests, 0 assertions, 0 failures, 0 errors
>>
>> --------------
>>
>> There is one test in this file and one assertion, so something is wrong.
>>
>> I'm using NetBeans 6.1, Built-in JRuby 1.8.6 (2008-03-31 patchlevel
>> 6360) [java]
>>
>> Any ideas?
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


--
Jared Nedzel
Cancer Genomics Informatics
Broad Institute
7 Cambridge Center
Cambridge, MA 02142

617-324-4825
jnedzel@...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: tests no longer working

by Erno Mononen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Jared,

Good to hear you got it working, not sure why JRuby swallows the
walkback. Maybe running it in the verbose mode ("-v") could help. As a
side note, I noticed that the jruby command I posted for running the
test included the -S switch, which should not be there in this case (it
causes JRuby to search the script in PATH and bin first).

Erno

Jared Nedzel wrote:

> Erno:
>
> It behaved the same when running from the command-line with JRuby.  I
> upgraded my Rails install so that I could run it with native Ruby.
> Changing to native Ruby, I got an understandable walk-back.  One of my
> classes had incorrect code:
>
> class Well < ActiveRecord::Base
>   belongs_to :user, :plate, :bead_set
>
> This should be:
>
>   belongs_to :user
>   belongs_to :plate
>   belongs_to :bead_set
>
> It appears that for some reason JRuby was swallowing the walkback.
>
> /Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/app/models/well.rb:12:in
> `belongs_to': wrong number of arguments (3 for 2) (ArgumentError)
>         from
> /Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/app/models/well.rb:12
>
>         from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
>         from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
> `require'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
> `new_constants_in'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
> `require'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:104:in
> `require_or_load'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:60:in
> `depend_on'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:442:in
> `require_dependency'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/fixtures.rb:872:in
> `require_fixture_classes'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/fixtures.rb:868:in
> `each'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/fixtures.rb:868:in
> `require_fixture_classes'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/fixtures.rb:863:in
> `fixtures'
>         from
> /Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/../test_helper.rb:35
>
>         from
> /Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/result_test.rb:1:in
> `require'
>         from
> /Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/result_test.rb:1
>
>
>
> Jared
>
> Erno Mononen wrote:
>> Hi Jared,
>>
>> Could you try whether you're able to run tests using native Ruby
>> instead of JRuby? Also, does it work if you run it from the command
>> line, e.g. just 'ruby test/unit/your_test.rb' and with JRuby 'jruby
>> -S test/unit/your_test.rb'? Lastly, it could a load path issue, there
>> are some fixes with regard to that in 6.5 dev builds, so it would be
>> great if you could try the latest build available at
>> http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/ 
>> and let us know whether the issue still exists.
>>
>> Thanks,
>> Erno
>>
>>
>> Jared Nedzel wrote:
>>> Folks:
>>>
>>> I've been working on tests for the last few days.  Everything was
>>> working fine.  Today, however, they stopped working.  No matter what
>>> I do, when I try to run unit tests, no tests are actually run.  For
>>> example, I have the following file:
>>>
>>> require File.dirname(__FILE__) + '/../test_helper'
>>>
>>> class ResultTest < ActiveSupport::TestCase
>>>   def test_truth
>>>     assert true
>>>   end
>>> end
>>>
>>> I run this by using the pop-up menu and selecting test.  The output
>>> is as follows:
>>>
>>> --------------
>>>
>>> JRuby limited openssl loaded. gem install jruby-openssl for full
>>> support.
>>> http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
>>> Loaded suite
>>> /Users/jnedzel/Documents/prj/luminex_db/netbeans/Luminex/test/unit/result_test
>>>
>>> Started
>>>
>>> Finished in 0.0010 seconds.
>>>
>>> 0 tests, 0 assertions, 0 failures, 0 errors
>>>
>>> --------------
>>>
>>> There is one test in this file and one assertion, so something is
>>> wrong.
>>>
>>> I'm using NetBeans 6.1, Built-in JRuby 1.8.6 (2008-03-31 patchlevel
>>> 6360) [java]
>>>
>>> Any ideas?
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...