diff options
| author | Alban Peignier | 2017-12-29 11:16:52 +0100 | 
|---|---|---|
| committer | Alban Peignier | 2017-12-29 11:16:58 +0100 | 
| commit | 3cd00c8b27e35028593479b717bfa01efe937b0c (patch) | |
| tree | 4de660233ee25f9154d11cf2ec2a021764af40a9 /spec/helpers | |
| parent | a072b918f274fe902226ae4cc376b318e3881c5f (diff) | |
| download | chouette-core-3cd00c8b27e35028593479b717bfa01efe937b0c.tar.bz2 | |
Replace CommonHelper.string_keys_to_symbols by Hash#symbolize_keys
Diffstat (limited to 'spec/helpers')
| -rw-r--r-- | spec/helpers/common_helper_spec.rb | 39 | 
1 files changed, 0 insertions, 39 deletions
| diff --git a/spec/helpers/common_helper_spec.rb b/spec/helpers/common_helper_spec.rb deleted file mode 100644 index 1ffdc5bab..000000000 --- a/spec/helpers/common_helper_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -RSpec.describe CommonHelper do - -  subject do -    Object.new.extend( described_class ) -  end - -  describe 'string_keys_to_symbols' do -    context 'nullpotency on symbol keys' do -      it { expect(subject.string_keys_to_symbols({})).to eq({}) } -      it do -        expect(subject.string_keys_to_symbols( -          a: 1, b: 2 -        )).to  eq(a: 1, b: 2) -      end -    end - -    context 'changing string keys' do -      it { expect(subject.string_keys_to_symbols('alpha' => 100)).to eq(alpha: 100) } - -      it do -        expect( subject.string_keys_to_symbols('a' => 10, b: 20) ) -          .to eq(a: 10, b: 20) -      end -      it do -        expect( subject.string_keys_to_symbols('a' => 10, 'b' => 20) ) -          .to eq(a: 10, b: 20) -      end -    end - -    context 'keys, not values, are changed' do -      it do -        expect(subject.string_keys_to_symbols(a: 'a', 'b' => 'b', 'c' => :c)) -          .to eq(a: 'a', b: 'b', c: :c) -      end -    end - - -  end -end | 
