Sha256: 74449f5f27efbfac9c6fba2d1f360d3ed0a876a7ecccf2c6045821232d9fc1fb
Contents?: true
Size: 598 Bytes
Versions: 9
Compression:
Stored size: 598 Bytes
Contents
require 'spec_helper' describe 'value checks' do let(:hash) { {foo: "bar", baz: "box", zap: nil} } describe 'no_blank_values' do it 'should return the hash without any nil values' do hash.no_blank_values.should_not have_key(:zap) end end describe "except" do it 'should return the hash except keys listed' do hash.except(:baz).should_not have_key(:baz) end end describe "only" do it 'should return a hash containing only the keys listed' do hash.only(:baz).should have_key(:baz) hash.only(:baz).should_not have_key(:foo) end end end
Version data entries
9 entries across 9 versions & 1 rubygems