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: line 1: syntax error near unexpected token
./test/unit/region_test.rb: line 1: `require File.dirname(__FILE__) +
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
Command failed with status (1): [/usr/bin/ruby
Dunno - do you have rcov, whatever that is, installed?