instiki/vendor/rails/activesupport/test/core_ext/module/model_naming_test.rb
Jacques Distler d4f97345db Rails 2.1.1
Among other things, a security fix.
2008-09-07 00:54:05 -05:00

20 lines
403 B
Ruby

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