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.

rake test:uncommitted raises undefined method map on String

#5397

Running the task test:uncommited raises an undefined method 'map' for String, using git.

$ rake --trace test:uncommitted
[...]
rake aborted!
undefined method `map' for #<String:0x8f3c728>
~/.gems/railties-3.0.0.beta4/lib/rails/test_unit/testing.rake:77:in `file_list'
[...]

My environment:

$ ruby -v
ruby 1.9.2dev (2010-07-30 revision 28788) [i686-linux]
$ rails -v
Rails 3.0.0.beta4

Reported by Sunny · August 17th, 2010 @ 11:43 PM

State: open
Milestone: none
Assigned to: Josh Kalderimis Josh Kalderimis
Importance: Low

Activity

  1. Sunny
    Sunny
    • Tag changed from git to git, rake, test

    August 17th, 2010 @ 11:44 PM

  2. Sunny
    Sunny
    • Tag changed from git, rake, test to git, patch, rake, test

    Attaching diff rather than github fork.

    August 18th, 2010 @ 12:05 AM

  3. Sunny
  4. Santiago Pastorino
    Santiago Pastorino
    • State changed from resolved to open
    • Importance changed from to Low

    August 18th, 2010 @ 04:37 PM

  5. Sunny
    Sunny
    • Tag changed from git, patch, rake, test to git, patch, rake, ruby1.9, test

    This is a Ruby 1.9 issue. Strings don't come with .map() anymore so this task always fails.

    January 17th, 2011 @ 10:00 PM

  6. Josh Kalderimis
    Josh Kalderimis
    • Tag changed from git, patch, rake, ruby1.9, test to rake, ruby1.9
    • Assigned user set to Josh Kalderimis

    Hi Sunny,

    I have spoken to José about this issue, and although your patch does fix it, the bigger issue at hand is that this code (rake task) isn't tested at all.

    Ideally the code within def files should be extracted into its own class which is tested and then used in this rake task.

    If you are still interested in working on this patch please let me know.

    Thanks

    Josh

    February 13th, 2011 @ 01:09 PM

  7. Sunny
    Sunny

    I'm interested in working on this patch but I'm not very familiar with the Rails codebase. It might take long.

    As for testing it, the tests would depend on svn and git. Is that ok for Rails?

    February 16th, 2011 @ 01:19 PM

  8. Josh Kalderimis
    Josh Kalderimis

    Hi Sunny,

    This is a good patch to start off with.

    And the tests won't need to depend on svn or git as we can stub out those parts.

    Fork rails, create a new branch for what you are doing, and start making changes, if you have any questions do not hesitate to ask, you can also find me on irc in #rails-contrib.

    I will leave the ticket assigned to me so I can monitor its progress.

    Thanks

    Josh

    February 16th, 2011 @ 02:01 PM

  9. Sunny
    Sunny

    Thanks Josh! Started making a few changes in a testuncommited branch. Not sure I'm placing things where they should be and feeling somewhat stuck. Guess I need to crawl through the whole Rails test suite to find similar tests.

    March 7th, 2011 @ 01:29 PM

  10. bingbing