This project is archived and is in readonly mode.

#3171 ✓stale
Alovak

[PATCH] test request with Bignums in parameters raises exception

Reported by Alovak | September 9th, 2009 @ 11:37 AM

My functional test cases fail with message: TypeError: allocator undefined for Bignum

Test example:

def test_should_get_edit

get :edit, :id => @administrator.id #instantiated fixture
assert_response :success
assert_equal assigns(:account), @administrator

end

I have found that ActionController::TestRequest method assign_parameters converts to String only Fixnum parameters. On 64 bits platform test passed without any failures, but on 32 bits test fail.

Here are the patchs with tests for Rails 3 and Rails 2.3.4

Comments and changes to this ticket

  • Alovak

    Alovak September 9th, 2009 @ 11:38 AM

    • Tag changed from 2.3.4, 3.0, test_process, test_request to 2.3.4, 3.0, patch, test_process, test_request
  • Alovak

    Alovak September 9th, 2009 @ 11:41 AM

    • Title changed from “integration test requests with Bignums raise exceptions” to “test request with Bignums in parameters raises exception”
  • Alovak

    Alovak September 9th, 2009 @ 11:42 AM

    • Title changed from “test request with Bignums in parameters raises exception” to “[PATCH] test request with Bignums in parameters raises exception”
  • CancelProfileIsBroken

    CancelProfileIsBroken September 25th, 2009 @ 12:28 PM

    • Tag changed from 2.3.4, 3.0, patch, test_process, test_request to 2.3.4, 3.0, bugmash, patch, test_process, test_request
  • John Pignata

    John Pignata September 27th, 2009 @ 03:41 AM

    +1 verified that the patch works on 2-3-stable

    The file in master has been refactored however and no longer applies - however the test included in the patch runs. This patch should no longer be necessary.

  • Alovak

    Alovak October 1st, 2009 @ 10:22 AM

    Tests should not work in Rails3 :)

    The error is still there:

    if value.is_a? Fixnum

          value = value.to_s
    

    I will check it again and provide patch for current Rails 3 file (lib/action_controller/testing/test_case.rb) if it's needed.

  • Rizwan Reza

    Rizwan Reza February 12th, 2010 @ 12:46 PM

    • Tag changed from 2.3.4, 3.0, bugmash, patch, test_process, test_request to 2.3.4, 3.0, patch, test_process, test_request
  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:55 PM

    • State changed from “new” to “open”
    • Tag changed from 2.3.4, 3.0, patch, test_process, test_request to 234, 30, patch, test_process, test_request
    • Importance changed from “” to “”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:55 PM

    • State changed from “open” to “stale”
  • klkk

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>

People watching this ticket

Pages