class NamingWithNamespacedModelInIsolatedNamespaceTest

Public Instance Methods

setup() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 48
def setup
  @model_name = ActiveModel::Name.new(Blog::Post, Blog)
end
test_collection() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 64
def test_collection
  assert_equal "blog/posts", @model_name.collection
end
test_element() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 60
def test_element
  assert_equal "post", @model_name.element
end
test_human() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 68
def test_human
  assert_equal "Post", @model_name.human
end
test_i18n_key() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 80
def test_i18n_key
  assert_equal :"blog/post", @model_name.i18n_key
end
test_param_key() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 76
def test_param_key
  assert_equal "post", @model_name.param_key
end
test_plural() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 56
def test_plural
  assert_equal "blog_posts", @model_name.plural
end
test_route_key() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 72
def test_route_key
  assert_equal "posts", @model_name.route_key
end
test_singular() click to toggle source
# File activemodel/test/cases/naming_test.rb, line 52
def test_singular
  assert_equal "blog_post", @model_name.singular
end