Hello list,
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''
2. If I change these lines to:
require 'test_helper'
class RegionTest < ActiveSupport::TestCase
I get following errors when running individual test
(./test/unit/region_test.rb):
./test/unit/region_test.rb: line 1: require: command not found
./test/unit/region_test.rb: line 2: ActiveSupport::TestCase: No such
file or directory
./test/unit/region_test.rb: line 8: fixtures: command not found
./test/unit/region_test.rb: line 10: def: command not found
./test/unit/region_test.rb: line 11: region: command not found
./test/unit/region_test.rb: line 12: assert: command not found
./test/unit/region_test.rb: line 13: syntax error near unexpected token
`('
./test/unit/region_test.rb: line 13: ` assert
region.errors.invalid?(:name)'
The rake test runs successfully in both cases.
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/...]
Rails version- 2.1.0 and 2.1.1 both are giving same problem.
Any clues?
Thanks,
CS.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---