run only one ruby test

for example, i want to run only one single test for edge. what command should i use?. the test i want to run is at the path: "/railties/test/ application/console_test.rb"

any idea? Thank you.

And, I am actually trying to patch https://rails.lighthouseapp.com/projects/8994/tickets/3822-reload-doesnt-reload . Is the ticket valid?

On railties/test directory do ruby application/console_test.rb

I don't know about any Rake tasks here, but you can just just use ruby.

Run a test case as in console_test.rb with:

  ruby -Itest -I../activesupport/lib test/application/console_test.rb

With the -n option you can additionally pick particular tests from that test case. E.g. to run the first test:

  ruby -Itest -I../activesupport/lib test/application/console_test.rb -n test_app_method_should_return_integration_session

Or run tests that match "integration_session":

  ruby -Itest -I../activesupport/lib test/application/console_test.rb -n /integration_session/

hth

I think I'll add this to docrails soon, as Contributor 101 :stuck_out_tongue:

+1. Adding that into docrails will help a lot.

Thanks.

Although this certainly is just a temporary solution or workaround.

Btw, I can see why Railties test cases don’t add a particular ActiveSupport lib path to the load path (people might want to use a different version for testing). But why don’t they add their own local test/ path?