PageRenderTime 50ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/module/test_integrate.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 23 lines | 17 code | 6 blank | 0 comment | 0 complexity | 131b1c3f67c5f2cf9fbf153c9df21f53 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. require 'facets/module/integrate'
  2. require 'test/unit'
  3. class Test_Module_Integrate < Test::Unit::TestCase
  4. module M
  5. def x ; 1 ; end
  6. end
  7. class C
  8. integrate M do
  9. rename :y, :x
  10. end
  11. end
  12. def test_integrate
  13. c = C.new
  14. assert_raises( NoMethodError ) { c.x }
  15. assert_equal( 1, c.y )
  16. end
  17. end