PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/array/test_stackable.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 22 lines | 14 code | 7 blank | 1 comment | 0 complexity | f258a301133b77498a789e9a06521fbc MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. # Test facets/array/stackable.rb
  2. require 'facets/array/stackable.rb'
  3. require 'test/unit'
  4. class TestArray < Test::Unit::TestCase
  5. def test_poke
  6. a = [2,3]
  7. assert_equal( [1,2,3], a.poke(1) )
  8. assert_equal( [4,1,2,3], a.poke(4) )
  9. end
  10. def test_pull
  11. a = [1,2,3]
  12. assert_equal( 1, a.pull )
  13. assert_equal( [2,3], a )
  14. end
  15. end