aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/test/core_ext/module/model_naming_test.rb
blob: d08349dd974dfac8b34608a51de809b559edd6dc (plain) (tree)
1
2
3
4
5
6
7
8
9



                                            
                                                                 


                   
                                                        


                 
                                                       


                       
                                                                        

     
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