« Return to Thread: How to run autotest(Zentest)

Re: How to run autotest(Zentest)

by Aljaz Fajmut :: Rate this Message:

Reply to Author | View in Thread


This can be helpful to future users
-------------------------------------------------
Rails autotest installation is not same in Windows and Linux. If we do
it in the same way then we will get the error "couldn't find HOME
environment -- expanding '~/.autotest'".
The reason for the error is Autotest looks for a .autotest file in the
path defined by the HOME environment variable. Whis is set in Linux but
not on windows. We don't necessarily
have to have a .autotest file, but we will need to set the HOME
environment variable.

Therefore, here is the installation instructions for the developers
using windows to work with autotest:

1. Install ZenTest
      --  gem install zentest
2. Install diff-lcs
      --  gem install zentest diff-lcs
3. Install RSpec Autotest

Without subversion -- ruby script/plugin install
http://svn.caldersphere.net/svn/main/plugins/rspec_autotest
With subversion -- ruby script/plugin install -x
http://svn.caldersphere.net/svn/main/plugins/rspec_autotest

4. In Linux after these steps "rake spec:autotest" will work fine. But
we need to do something more for windows environment.

    * Download and install diffutils, " Complete package, except sources
---   Setup ---24 May 2004 " from
http://gnuwin32.sourceforge.net/packages/diffutils.htm
    * Put the installation directory of diff.exe into your PATH in
Control Panel --> System --> Advanced --> Environment Variables.

5. Go to the application directory of current rails application then set
the home variable:

   -- set home=.

6. Go to the current rails application directory and run
    -- autotest


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Only if required ------

If rake spec:autotest don't work go through the following steps:

1. For ZenTest 3.5.0++
cd spec
svn export
http://svn.caldersphere.net/svn/main/rspec_autotest/trunk/lib/rspec_autotest.rb
cd ..

2. Add the following in the Rake file.

namespace :spec do
  task :autotest do
    require './spec/rspec_autotest'
    RspecAutotest.run
  end
end

Or if you really want a Rake task for the job, add this to the Rakefile:

namespace :spec do
  task :autotest do
    system 'autotest'
  end
end

3. Start working with rake spec:autotest or autotest.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--
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 rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: How to run autotest(Zentest)