Carlos Santana wrote:
Luv your jams, man!
> I am having following problem while running unit tests.
>
> 1. The test file contains:
> require File.dirname(__FILE__) + '/../test_helper'
> class RegionTest < Test::Unit::TestCase
> I receive following error when running individual test
> (./test/unit/region_test.rb):
> ./test/unit/region_test.rb: line 1: syntax error near unexpected token
> `('
> ./test/unit/region_test.rb: line 1: `require File.dirname(__FILE__) +
> '/../test_helper''
Prepare to smack your forehead. I get that running this:
$ sh test/unit/merchant_test.rb
test/unit/merchant_test.rb: 1: Syntax error: "(" unexpected
That's sh, meaning bash, not Ruby. Whatever runs your tests needs an explicit
'ruby' in it. That is the way of things.
> Also, rake test:test:rcov or rake:test:units:rcov is failing with error
> as,
> Command failed with status (1): [/usr/bin/ruby
> "/home/carlos/mytopics/...]
Dunno - do you have rcov, whatever that is, installed?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---