Skip to content
This repository
Browse code

test for ActiveModel::Conversion#to_partial_path and namespaced models

  • Loading branch information...
commit bc19c0d09cd04e1862c7a8f3bb7bcaf289270df3 1 parent bf09577
Yves Senn senny authored
4 activemodel/test/cases/conversion_test.rb
@@ -29,4 +29,8 @@ class ConversionTest < ActiveModel::TestCase
29 29 assert_equal "helicopters/helicopter", Helicopter.new.to_partial_path,
30 30 "ActiveModel::Conversion#to_partial_path caching should be class-specific"
31 31 end
  32 +
  33 + test "to_partial_path handles namespaced models" do
  34 + assert_equal "helicopter/comanches/comanche", Helicopter::Comanche.new.to_partial_path
  35 + end
32 36 end
4 activemodel/test/models/helicopter.rb
... ... @@ -1,3 +1,7 @@
1 1 class Helicopter
2 2 include ActiveModel::Conversion
3 3 end
  4 +
  5 +class Helicopter::Comanche
  6 + include ActiveModel::Conversion
  7 +end

0 comments on commit bc19c0d

Please sign in to comment.
Something went wrong with that request. Please try again.