Sha256: c7414e1c19d70150d11e34cc54cda7f24bba6bef86f2b8f38c7ecf671ad02833

Contents?: true

Size: 390 Bytes

Versions: 35

Compression:

Stored size: 390 Bytes

Contents

require File.join(File.dirname(__FILE__), '/../../test_helper')

class HashTest < ActiveSupport::TestCase
  def test_except
    x = {:a => 1, :b => 2}
    assert_equal({:b => 2}, x.except(:a))
    assert_equal({:a => 1, :b => 2}, x)
  end
  
  def test_extract!
    x = {:a => 1, :b => 2}
    y = x.extract!(:b, :c)
    assert_equal({:a => 1}, x)
    assert_equal({:b => 2}, y)
  end
  
end

Version data entries

35 entries across 35 versions & 11 rubygems

Version Path
SFEley-browsercms-3.0.2 test/unit/extensions/hash_test.rb
buzzware-browsercms-3.0.2 test/unit/extensions/hash_test.rb
coredumplings-browsercms-3.0.0 test/unit/extensions/hash_test.rb
nate-browsercms-3.0.210 test/unit/extensions/hash_test.rb
nate-browsercms-3.0.211 test/unit/extensions/hash_test.rb
we5-browsercms-3.0.1.1 test/unit/extensions/hash_test.rb
webficient-browsercms-3.0.1 test/unit/extensions/hash_test.rb
webficient-browsercms-3.0.2 test/unit/extensions/hash_test.rb
webficient-browsercms-3.0.3 test/unit/extensions/hash_test.rb
webficient-browsercms-3.0.4 test/unit/extensions/hash_test.rb
browsercms-3.1.5 test/unit/extensions/hash_test.rb
browsercms-3.1.4 test/unit/extensions/hash_test.rb
browsercms-3.1.3 test/unit/extensions/hash_test.rb
bf4-browsercms-3.1.0 test/unit/extensions/hash_test.rb
drujensen-browsercms-3.2.0 test/unit/extensions/hash_test.rb
browsercmsi-3.1.2 test/unit/extensions/hash_test.rb
browsercms-3.1.2 test/unit/extensions/hash_test.rb
browsercms-3.1.1 test/unit/extensions/hash_test.rb
browsercmsi-3.1.1 test/unit/extensions/hash_test.rb
browsercmsi-3.1.0 test/unit/extensions/hash_test.rb