Can't make the gem work properly #19

Closed
netbe opened this Issue Aug 23, 2012 · 5 comments

Comments

Projects
None yet
3 participants

netbe commented Aug 23, 2012

Hi,

When running m test/unit/game_test.rb I'm getting:

No tests found on line 0. Valid tests to run:

Same thing occurs when I try with a given line

m test/unit/game_test.rb:39

No tests found on line 39. Valid tests to run:

I don't understand what I am doing wrong, did I missed something from the doc?

Thanks for your help.

netbe commented Aug 31, 2012

@qrush any ideas?

netbe commented Sep 3, 2012

Hi,

I think I found the cause of the issue. I am using Test::Unit and it appears the gem does not work with it anymore.

Test::Unit::TestCase.test_suites is not a defined method

This method is never called in my case :

      if defined?(MiniTest)
        suites = MiniTest::Unit::TestCase.test_suites
      elsif defined?(Test)
        suites = Test::Unit::TestCase.test_suites
      else
        not_supported
      end

As I have ruby 1.9.3 minitest is defined, so suites = [], that's why I did not get the exception and as I don't use minitest directly there's no tests to find.

The solution would be to change the order of if conditions and replace the the Test::Unit::TestCase.test_suites but I could not figure out what to call instead.

I'll try to make something up if other people get the same problem, otherwise switching to minitest seems quicker.

claco commented Sep 8, 2012

I have a similar issue. m test/integration/foo_test.rb runs just fine in the gemset.
If I try running that under bundle exec, bundle exec m test/integration/foo_test.rb, it dies with:

/Users/claco/.rvm/gems/ruby-1.9.3-p125@bitsapi/gems/m-1.2.1/lib/m.rb:229:in suites': undefined methodtest_suites' for Test::Unit::TestCase:Class (NoMethodError)
from /Users/claco/.rvm/gems/ruby-1.9.3-p125@bitsapi/gems/m-1.2.1/lib/m.rb:251:in tests' from /Users/claco/.rvm/gems/ruby-1.9.3-p125@bitsapi/gems/m-1.2.1/lib/m.rb:179:inexecute'
from /Users/claco/.rvm/gems/ruby-1.9.3-p125@bitsapi/gems/m-1.2.1/lib/m.rb:120:in run' from /Users/claco/.rvm/gems/ruby-1.9.3-p125@bitsapi/gems/m-1.2.1/lib/m.rb:105:inrun'
from /Users/claco/.rvm/gems/ruby-1.9.3-p125@bitsapi/gems/m-1.2.1/bin/m:4:in <top (required)>' from /Users/claco/.rvm/gems/ruby-1.9.3-p125@bitsapi/bin/m:19:inload'
from /Users/claco/.rvm/gems/ruby-1.9.3-p125@bitsapi/bin/m:19:in `

'

netbe commented Sep 25, 2012

Hi @claco,

what's in your gemset ? ruby version and test frameworks
what's in your gemfile? ruby version and test frameworks

Owner

qrush commented Dec 28, 2012

This should be fixed. Please open another issue if not.

@qrush qrush closed this Dec 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment