diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2017-05-25 18:43:21 -0500 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2017-05-25 18:43:21 -0500 |
commit | 9cc61a93c3bff5c62a3d354e0d3216de01eb9f0b (patch) | |
tree | 147512e0f3ac13e8a9e3083bc722aad24666941c /spec/unit/version_string_spec.rb | |
parent | d9a4af931c0b17e2a1e3e3d7a9f682b7193a73c4 (diff) | |
download | chef-9cc61a93c3bff5c62a3d354e0d3216de01eb9f0b.tar.gz |
The case syntax is nice but not worth a core monkeypatch. ::sad trombone::
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'spec/unit/version_string_spec.rb')
-rw-r--r-- | spec/unit/version_string_spec.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/spec/unit/version_string_spec.rb b/spec/unit/version_string_spec.rb index 7e4a9246f9..11bb7d07a5 100644 --- a/spec/unit/version_string_spec.rb +++ b/spec/unit/version_string_spec.rb @@ -74,46 +74,4 @@ describe Chef::VersionString do subject { '~> 1.0' =~ described_object } it { expect { subject }.to raise_error TypeError } end - - context 'with case statement' do - subject do - case described_object - when 'abc' - :a - when '1.2.3' - :b - when /^2\.0/ - :c - when '~> 2.0' - :d - when '~> 1.0' - :e - end - end - - context 'with 1.2.3' do - let(:input) { '1.2.3' } - it { is_expected.to eq :b } - end - - context 'with 2.0.0' do - let(:input) { '2.0.0' } - it { is_expected.to eq :c } - end - - context 'with 2.1.0' do - let(:input) { '2.1.0' } - it { is_expected.to eq :d } - end - - context 'with 1.2.4' do - let(:input) { '1.2.4' } - it { is_expected.to eq :e } - end - - context 'with 0' do - let(:input) { '0' } - it { is_expected.to be nil } - end - end end |