Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use query methods rather than readers in boolean tests for [3092]. Re…

…ferences #2945.  Closes #2949.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 77e0b7986e56e5d1d607aaa05a460709977c8c34 1 parent 2ed6d36
@jeremy jeremy authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/test/base_test.rb
View
8 activerecord/test/base_test.rb
@@ -226,19 +226,19 @@ def test_read_write_boolean_attribute
topic.approved = "false"
# puts "Expecting false"
# puts topic.inspect
- assert !topic.approved, "approved should be false"
+ assert !topic.approved?, "approved should be false"
topic.approved = "false"
# puts "Expecting false"
# puts topic.inspect
- assert !topic.approved, "approved should be false"
+ assert !topic.approved?, "approved should be false"
topic.approved = "true"
# puts "Expecting true"
# puts topic.inspect
- assert topic.approved, "approved should be true"
+ assert topic.approved?, "approved should be true"
topic.approved = "true"
# puts "Expecting true"
# puts topic.inspect
- assert topic.approved, "approved should be true"
+ assert topic.approved?, "approved should be true"
# puts ""
end
Please sign in to comment.
Something went wrong with that request. Please try again.