class NamingTest

Public Instance Methods

setup() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 10
def setup
  @model_name = ActiveModel::Name.new(Post::TrackBack)
end
test_collection() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 26
def test_collection
  assert_equal "post/track_backs", @model_name.collection
end
test_element() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 22
def test_element
  assert_equal "track_back", @model_name.element
end
test_human() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 30
def test_human
  assert_equal "Track back", @model_name.human
end
test_i18n_key() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 42
def test_i18n_key
  assert_equal :"post/track_back", @model_name.i18n_key
end
test_param_key() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 38
def test_param_key
  assert_equal "post_track_back", @model_name.param_key
end
test_plural() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 18
def test_plural
  assert_equal "post_track_backs", @model_name.plural
end
test_route_key() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 34
def test_route_key
  assert_equal "post_track_backs", @model_name.route_key
end
test_singular() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 14
def test_singular
  assert_equal "post_track_back", @model_name.singular
end