Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test fixes for jruby #1430

Merged
merged 2 commits into from Jun 1, 2011
Merged

Conversation

vishnuatrai
Copy link
Contributor

No description provided.

@dmathieu
Copy link
Contributor

If you did assert_equal "0", bool.reload.attributes_before_type_cast["value"].to_s, you wouldn't need to have a condition and could have it in only one line :)

@vishnuatrai
Copy link
Contributor Author

Yes I know, we can do that for the sake of test pass but that will override the test for MRI ruby with MySQL thats why I added the condition.

@@ -124,7 +124,11 @@ class AttributeMethodsTest < ActiveRecord::TestCase
if current_adapter?(:MysqlAdapter)
def test_read_attributes_before_type_cast_on_boolean
bool = Boolean.create({ "value" => false })
assert_equal "0", bool.reload.attributes_before_type_cast["value"]
if RUBY_PLATFORM =~ /java/
assert_equal 0, bool.reload.attributes_before_type_cast["value"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding another comment before this line saying something like "JRuby will returns the value before typecast as integer" or something like that? I think we might forget why this condition has to be exists at later date.

@sikachu
Copy link
Member

sikachu commented Jun 1, 2011

Does this one fails for master and 3-1-stable as well?

@vishnuatrai
Copy link
Contributor Author

@sikachu commits updated. Jruby with rails master is totally in bad shape.

One question Are you now Rails Repo Collab ?? Just seeing a tag on your comment :-)

@vishnuatrai
Copy link
Contributor Author

yeah. I see you are already in Rails list ;-)

@sikachu
Copy link
Member

sikachu commented Jun 1, 2011

I'd love to help you guys out to get jRuby to play nice with Rails. Keep them coming.

regarding repo collab, I use this permission just for cleaning up tickets bin ;)

@arunagw
Copy link
Member

arunagw commented Jun 1, 2011

@sikachu awesome.!! We will Keep stay for Jruby.

jonleighton added a commit that referenced this pull request Jun 1, 2011
@jonleighton jonleighton merged commit 7bd8012 into rails:3-0-stable Jun 1, 2011
@jonleighton
Copy link
Member

I merged this into master and 3-1-stable too.

@arunagw
Copy link
Member

arunagw commented Jun 1, 2011

@jonleighton thanks.!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants