instiki/vendor/rails/activesupport/test/core_ext/module/model_naming_test.rb
Jacques Distler 4e14ccc74d Instiki 0.16.3: Rails 2.3.0
Instiki now runs on the Rails 2.3.0 Candidate Release.
Among other improvements, this means that it now 
automagically selects between WEBrick and Mongrel.

Just run

    ./instiki --daemon
2009-02-04 14:26:08 -06:00

20 lines
427 B
Ruby

require 'abstract_unit'
class ModelNamingTest < Test::Unit::TestCase
def setup
@model_name = ActiveSupport::ModelName.new('Post::TrackBack')
end
def test_singular
assert_equal 'post_track_back', @model_name.singular
end
def test_plural
assert_equal 'post_track_backs', @model_name.plural
end
def test_partial_path
assert_equal 'post/track_backs/track_back', @model_name.partial_path
end
end