mirror of
https://github.com/github/rails.git
synced 2026-01-30 00:38:00 -05:00
A couple extra tests for #classify. Closes #7273. [Josh Susser]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* A couple extra tests for #classify. Closes #7273. [Josh Susser]
|
||||
|
||||
* Better docs for Object extensions [zackchandler, Jamis Buck]
|
||||
|
||||
* Fix that Dates couldn't be subtracted from Dates after [5940]. [Sam Stephenson]
|
||||
|
||||
@@ -275,12 +275,13 @@ class InflectorTest < Test::Unit::TestCase
|
||||
def test_classify
|
||||
ClassNameToTableName.each do |class_name, table_name|
|
||||
assert_equal(class_name, Inflector.classify(table_name))
|
||||
assert_equal(class_name, Inflector.classify("table_prefix." + table_name))
|
||||
end
|
||||
end
|
||||
|
||||
def test_classify_with_symbol
|
||||
assert_nothing_raised do
|
||||
assert_equal 'FooBar', Inflector.classify(:foo_bar)
|
||||
assert_equal 'FooBar', Inflector.classify(:foo_bars)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user