Newbie Testing: jruby -S rake

Hi,

I’m running jruby 1.4.0 and I’m trying to use the unit test feature. I
haven’t really added anything I just wanted to see if it works.

test\unit\product_user_test.rb

require ‘test_helper’

class ProductUserTest < ActiveSupport::TestCase
def test_user_id
assert = true
end
end

When I run jruby -S rake the test should succeed, but I get this.

C:\jruby-1.4.0\product>jruby -S rake
(in C:/jruby-1.4.0/product)
C:/jruby-1.4.0/bin/jruby.exe -I"lib;test"
“C:/jruby-1.4.0/lib/ruby/gems/1.8/gems
/rake-0.8.7/lib/rake/rake_test_loader.rb”
C:/jruby-1.4.0/bin/jruby.exe -I"lib;test"
“C:/jruby-1.4.0/lib/ruby/gems/1.8/gems
/rake-0.8.7/lib/rake/rake_test_loader.rb”
Errors running test:units!

What’s wrong

Locus Lo wrote:

Hi,

I’m running jruby 1.4.0 and I’m trying to use the unit test feature. I
haven’t really added anything I just wanted to see if it works.

test\unit\product_user_test.rb

require ‘test_helper’

class ProductUserTest < ActiveSupport::TestCase
def test_user_id
assert = true
end
end

When I run jruby -S rake the test should succeed, but I get this.

C:\jruby-1.4.0\product>jruby -S rake
(in C:/jruby-1.4.0/product)
C:/jruby-1.4.0/bin/jruby.exe -I"lib;test"
“C:/jruby-1.4.0/lib/ruby/gems/1.8/gems
/rake-0.8.7/lib/rake/rake_test_loader.rb”
C:/jruby-1.4.0/bin/jruby.exe -I"lib;test"
“C:/jruby-1.4.0/lib/ruby/gems/1.8/gems
/rake-0.8.7/lib/rake/rake_test_loader.rb”
Errors running test:units!

What’s wrong

You might try changing the test to read:

def test_user_id
assert true #remove equal siqn…
end

sorry you haven’t gotten a response until now, I just joined the forum
and posted a question about testing… hopefully I’ll get a quicker
response than you! :smiley:

Cheers,
Eric

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