Problem with rakefile


#1

hi,

I am having a problem with the rake test_units in my RoR application.
when i’m running it it tries to run all the files that end in *.rb (i
think) under the /unit folder in the project and it’s subfolders.

The problem is that my source control system (bitkeeper) saves an
subfolder named SCCS under each of the project folders, and in it, for
eack .rb file another file called something like s.orig_file_name.rb.
this fails the rake task since these s.xxx.rb files are not valid ruby
unit test files…

How can i configure the rake to ignore all the files in the SCCS
directories ?
Is there any global variable i can edit ?

Thanks in Advance,
Amir.


#2

amir lidor wrote:

hi,

I am having a problem with the rake test_units in my RoR application.
when i’m running it it tries to run all the files that end in *.rb (i
think) under the /unit folder in the project and it’s subfolders.

The problem is that my source control system (bitkeeper) saves an
subfolder named SCCS under each of the project folders, and in it, for
eack .rb file another file called something like s.orig_file_name.rb.
this fails the rake task since these s.xxx.rb files are not valid ruby
unit test files…

How can i configure the rake to ignore all the files in the SCCS
directories ?
Is there any global variable i can edit ?

Thanks in Advance,
Amir.

well,
I found some kind of solution, although I’m quiet sure there is a better
way of doing it.
what i did was to add another .rake file for my app in the
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/tasks directory in
which i added a task of my own:
desc “MY TEST Run the unit tests in test/unit”
Rake::TestTask.new(:my_test_units => [ :prepare_test_database ]) do |t|
t.libs << “test”
t.pattern = ‘test/unit/*_test.rb’
t.verbose = true
end

I don’t really like this patch since i’d like my new .rake file to be
also under my source control system… also it’ just a copy-paste of
the
testing.rake relevant section…
I imagine there is a cleaner way of just overriding the tasks somewhere
in the project…