Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[BUG] [PATCH] Rails 3.0 should allow tests to run in 'cucumber' environment

#4458

rails/railties/lib/rails/test_help.rb aborts if the environment is not 'test'. See: http://github.com/rails/rails/blob/master/railties/lib/rails/test_h...

I can't run Cucumber/RSpec/Test_Unit tests in different environments then.

I attach a path so that it aborts testing if the environment is development or production.

Edit: That's in Rails 3.0. Looks like I can't update the milestone. Sorry for this. :-/

Reported by Philippe Creux · April 22nd, 2010 @ 06:58 PM

State: resolved
Milestone: 3.0.5
Assigned to: nobody
Importance: Low

Activity

  1. Philippe Creux
    Philippe Creux
    • Title changed from Rails should allow test to run in 'cucumber' environment to Rails 3.0 should allow tests to run in 'cucumber' environment

    April 22nd, 2010 @ 07:05 PM

  2. Philippe Creux
    Philippe Creux
    • Tag set to rails 3, cucumber, environement, environments, rspec
    • Title changed from Rails 3.0 should allow tests to run in 'cucumber' environment to [BUG] [PATCH] Rails 3.0 should allow tests to run in 'cucumber' environment

    April 22nd, 2010 @ 07:06 PM

  3. Rizwan Reza
    Rizwan Reza
    • Milestone cleared.
    • State changed from new to open

    I am kinda skeptical on this one. The patch checks for development and production environment only while there's a good chance for a lot of Rails developers to define staging environment (much like production), among others.

    I don't know, may be an environment variable can be taken into account when it's present?

    May 15th, 2010 @ 03:14 PM

  4. Rizwan Reza
    Rizwan Reza
    • Tag changed from rails 3, cucumber, environement, environments, rspec to rails 3, bugmash, cucumber, environement, environments, rspec

    May 15th, 2010 @ 03:14 PM

  5. elcuervo
    elcuervo

    Perhaps changing ActiveSupport::StringInquirer and making it able to, depending on a [environment].rb, use a config.test = true or something like that?

    May 15th, 2010 @ 06:01 PM

  6. Trotter Cashion
    Trotter Cashion
    • Importance changed from to Low

    Seems like having config.test_env = true is worthwhile. We (Trevor Menagh, Sean Greive, Trotter Cashion) created this patch to do just that. Will allow alternate test environments to declare themselves as test_envs.

    August 3rd, 2010 @ 01:22 AM

  7. Jeremy Kemper
  8. Jeremy Kemper
  9. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 19th, 2010 @ 08:34 AM

  10. Santiago Pastorino
  11. Cesario
    Cesario

    This ticket can be closed safely, the new condition is Abort if Rails.env.production?
    https://github.com/rails/rails/commit/672ce11d684e1211836ca22cf5b0c...

    November 24th, 2010 @ 07:38 PM

  12. Rohit Arondekar
    Rohit Arondekar
    • State changed from open to resolved

    December 12th, 2010 @ 02:17 AM

  13. Santiago Pastorino