1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add a regression test that ActionText caught

ActionText is using ActionView in a way that ActionView doesn't have in
it's test suite.  This is just a regression test to hit that same use
case.
This commit is contained in:
Aaron Patterson 2020-02-27 16:46:41 -08:00
parent e105c074d6
commit 5f596e299e
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1 @@
Hello: <%= customer.name %>

View file

@ -325,6 +325,10 @@ module RenderTestCases
assert_equal "NilClass", @view.render(partial: "test/klass", object: nil)
end
def test_render_object_different_name
assert_equal "Hello: t.lo", @view.render(partial: "test/template_not_named_customer", object: Customer.new("t.lo"), as: "customer").chomp
end
def test_render_object_with_array
assert_equal "[1, 2, 3]", @view.render(partial: "test/object_inspector", object: [1, 2, 3])
end