mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -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:
parent
8296c680d5
commit
f3f691eaf2
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue