This project is archived and is in readonly mode.

#4215 ✓resolved
Sebastian Martinez

[PATCH] ActiveSupport ts_isolated test not running

Reported by Sebastian Martinez | March 18th, 2010 @ 04:28 PM | in 3.0.2

Got this require error when running this test alone.

activesupport/test/ts_isolated.rb:3:in require': no such file to load -- active_support/core_ext/kernel/reporting (LoadError)<br/>

from activesupport/test/ts_isolated.rb:3

Patch attached resolving this issue.

Comments and changes to this ticket

  • José Valim

    José Valim March 18th, 2010 @ 04:34 PM

    Hey Sebastian, thanks for the patch, but the require you are trying to remove is correct. Something else is wrong. Please try a patch where you add "active_support/lib" to the $LOAD_PATH, so the current require still works.

  • Sebastian Martinez
  • Sebastian Martinez

    Sebastian Martinez March 18th, 2010 @ 04:38 PM

    The patch does not intend to remove the require, but to add the correct path to it, so it can propely find reporting.rb
    Anyway, will upload a patch where active_support/lib is added to $LOAD_PATH

  • José Valim

    José Valim March 18th, 2010 @ 04:47 PM

    Yes, I understood that. But loading lib/active_support/* is not the right fix. :)

  • Sebastian Martinez

    Sebastian Martinez March 18th, 2010 @ 05:15 PM

    Oh ok, sorry.
    Find attached new patch loading 'active_support/lib' to path.

  • José Valim

    José Valim March 18th, 2010 @ 05:16 PM

    • Milestone cleared.
    • State changed from “new” to “open”

    Awesome, thanks! :D

  • Santiago Pastorino

    Santiago Pastorino March 18th, 2010 @ 07:44 PM

    • State changed from “open” to “new”

    I was helping Sebastian with that, i think we should require abstract_unit to prevent this kind of troubles.
    Anyways this test ran standalone fails with:
    I'm going to take a look at this things too.

    ...FF...........................................F.F.............................. Finished in 111.80542 seconds.

    1) Failure: test ./callback_inheritance_test.rb(TestIsolated)

    [ts_isolated.rb:13:in `test ./callback_inheritance_test.rb'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
    

    /usr/bin/ruby1.8 -Ilib:test ./callback_inheritance_test.rb

    2) Failure: test ./callbacks_test.rb(TestIsolated)

    [ts_isolated.rb:13:in `test ./callbacks_test.rb'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
    

    /usr/bin/ruby1.8 -Ilib:test ./callbacks_test.rb

    3) Failure: test ./dependencies_test.rb(TestIsolated)

    [ts_isolated.rb:13:in `test ./dependencies_test.rb'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
    

    /usr/bin/ruby1.8 -Ilib:test ./dependencies_test.rb Loaded suite ./dependencies_test
    Started
    .............................................................F Finished in 0.21817 seconds.

    1) Failure: test_warnings_should_be_enabled_on_first_load(DependenciesTest)

    [./dependencies_test.rb:101:in `test_warnings_should_be_enabled_on_first_load'
     ./dependencies_test.rb:30:in `with_loading'
     ./dependencies_test.rb:87:in `test_warnings_should_be_enabled_on_first_load'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
    

    is not true.

    62 tests, 208 assertions, 1 failures, 0 errors

    4) Failure: test ./flush_cache_on_private_memoization_test.rb(TestIsolated)

    [ts_isolated.rb:13:in `test ./flush_cache_on_private_memoization_test.rb'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
     /var/lib/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
    

    /usr/bin/ruby1.8 -Ilib:test ./flush_cache_on_private_memoization_test.rb

  • Santiago Pastorino

    Santiago Pastorino March 18th, 2010 @ 07:44 PM

    • State changed from “new” to “open”
  • Santiago Pastorino

    Santiago Pastorino March 18th, 2010 @ 07:59 PM

    Some tests ts_isolated runs should require abstract_unit too.
    Here's the right patch.

  • Santiago Pastorino

    Santiago Pastorino March 18th, 2010 @ 08:17 PM

    Running dependencies_test standalone fails so we added another commit to the patch to make it green.
    Apply this one.

  • Santiago Pastorino
  • Santiago Pastorino

    Santiago Pastorino March 18th, 2010 @ 10:10 PM

    Ohh sorry the previous patches broke test if you ran with rake test:isolated. I've deleted all my wrong uploaded patches. Now everything is working fine.

  • Repository

    Repository March 19th, 2010 @ 12:50 AM

    • State changed from “open” to “committed”

    (from [1e2caa5d52b9f367a1d7dc51d063a7ab1444b712]) Added missing requires abstract_unit and activesupport to the loadpath of ts_isolated [#4215 state:committed]

    Signed-off-by: wycats wycats@gmail.com
    http://github.com/rails/rails/commit/1e2caa5d52b9f367a1d7dc51d063a7...

  • Repository

    Repository March 19th, 2010 @ 12:50 AM

    • State changed from “committed” to “resolved”

    (from [e7276a9f099b0229ac76422f8341d5d91dad8872]) Make dependencies_test pass running standalone [#4215 state:resolved]

    Signed-off-by: wycats wycats@gmail.com
    http://github.com/rails/rails/commit/e7276a9f099b0229ac76422f8341d5...

  • Jeremy Kemper

    Jeremy Kemper October 15th, 2010 @ 11:01 PM

    • Milestone set to 3.0.2

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages