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

Add test for DateTime#blank? #27924

Merged
merged 1 commit into from
Feb 6, 2017

Conversation

kenta-s
Copy link
Contributor

@kenta-s kenta-s commented Feb 6, 2017

Currently there are no tests for DateTime#blank?
Even after I make the method return true as an experiment, all the tests were passed :P

@rails-bot
Copy link

r? @pixeltrix

(@rails-bot has picked a reviewer for you, use r? to override)

@@ -318,6 +318,10 @@ def test_acts_like_time
assert DateTime.new.acts_like_time?
end

def test_blank
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be test_blank?.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@simi thank you :)

@pixeltrix
Copy link
Contributor

@kenta-s are there equivalent tests for Date and ActiveSupport::TimeWithZone ?

@kenta-s
Copy link
Contributor Author

kenta-s commented Feb 6, 2017

No, I couldn't find them. Let me add them as well :)

@kenta-s
Copy link
Contributor Author

kenta-s commented Feb 6, 2017

@pixeltrix done :)

@rafaelfranca
Copy link
Member

Do those classes implement #blank? explicitly or are them relying in the Object#blank? implementation?

@rafaelfranca rafaelfranca merged commit bed90df into rails:master Feb 6, 2017
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

6 participants