blob: fc73fa5c36ddc6183614b3a3191eb9d82abc5a1d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
require 'abstract_unit'
class ModelNamingTest < Test::Unit::TestCase
def setup
@name = ActiveSupport::ModelName.new('Post::TrackBack')
end
def test_singular
assert_equal 'post_track_back', @name.singular
end
def test_plural
assert_equal 'post_track_backs', @name.plural
end
def test_partial_path
assert_equal 'post/track_backs/track_back', @name.partial_path
end
end
|