« Return to Thread: running a unit test over and over in script/console

Re: running a unit test over and over in script/console

by Robby Russell-2 :: Rate this Message:

Reply to Author | View in Thread


You should look into using autotest for this.

http://ph7spot.com/articles/getting_started_with_autotest

On Wed, Jul 8, 2009 at 11:59 AM, Andrew
Arrow<rails-mailing-list@...> wrote:

>
> I started doing this:
>
> $ RAILS_ENV=test script/console
>
>>> load 'test/unit/models/example_test.rb'; r = Test::Unit::TestResult.new; reload!; ExampleTest.new(:test_example1).run(r) { |c,v| }; pp results
>
> and then just hit up arrow and run that same line again over and over in
> script/console.  That way I can make changes to the test and app code,
> and don't have to wait for rails startup each time.
>
> Does that make sense to others?  I'm a missing something that will make
> this a bad way to run a test?
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>



--
Robby Russell
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails

http://planetargon.com/
http://robbyonrails.com/
http://twitter.com/planetargon
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]

--~--~---------~--~----~------------~-------~--~----~
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: running a unit test over and over in script/console