diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2017-05-30 17:37:38 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2017-05-30 17:37:38 -0700 |
commit | 4b2d4c3c119aabf6039bef5599f265ffd1db4d91 (patch) | |
tree | a2531d4899e97b94ee94d2498fa91b299fd19d56 | |
parent | 8c4d731d537a6ab849dad1a8ad51e2988b72b5a3 (diff) | |
download | chef-4b2d4c3c119aabf6039bef5599f265ffd1db4d91.tar.gz |
Feed the rubocop.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
-rw-r--r-- | lib/chef/version.rb | 2 | ||||
-rw-r--r-- | spec/unit/version_string_spec.rb | 58 |
2 files changed, 30 insertions, 30 deletions
diff --git a/lib/chef/version.rb b/lib/chef/version.rb index df3b87a9fd..44596e20da 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -19,7 +19,7 @@ # task instead. #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -require 'chef/version_string' +require "chef/version_string" class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) diff --git a/spec/unit/version_string_spec.rb b/spec/unit/version_string_spec.rb index 48594cbd48..14fc786d1b 100644 --- a/spec/unit/version_string_spec.rb +++ b/spec/unit/version_string_spec.rb @@ -17,63 +17,63 @@ require "spec_helper" require "chef/version_string" describe Chef::VersionString do - let(:input) { '1.2.3' } + let(:input) { "1.2.3" } subject(:described_object) { described_class.new(input) } - it { is_expected.to eq '1.2.3' } - it { is_expected.to eql '1.2.3' } - it { is_expected.to be == '1.2.3' } - it { is_expected.to be < 'abc' } - it { is_expected.to be > '0' } - it { is_expected.to eq described_class.new('1.2.3') } - it { is_expected.to be == described_class.new('1.2.3') } + it { is_expected.to eq "1.2.3" } + it { is_expected.to eql "1.2.3" } + it { is_expected.to be == "1.2.3" } + it { is_expected.to be < "abc" } + it { is_expected.to be > "0" } + it { is_expected.to eq described_class.new("1.2.3") } + it { is_expected.to be == described_class.new("1.2.3") } - context 'with !=' do - subject { described_object != '1.2.4' } + context "with !=" do + subject { described_object != "1.2.4" } it { is_expected.to be true } end - context 'with +' do - subject { described_object + 'asdf' } - it { is_expected.to eq '1.2.3asdf' } + context "with +" do + subject { described_object + "asdf" } + it { is_expected.to eq "1.2.3asdf" } end - context 'with *' do + context "with *" do subject { described_object * 3 } - it { is_expected.to eq '1.2.31.2.31.2.3' } + it { is_expected.to eq "1.2.31.2.31.2.3" } end - context 'with version-like comparisons' do - subject { described_class.new('1.02.3') } + context "with version-like comparisons" do + subject { described_class.new("1.02.3") } - it { is_expected.to eq '1.2.3' } - it { is_expected.to be > '1.2.2' } - it { is_expected.to be > '1.2.3a' } - it { is_expected.to be < '1.2.4' } + it { is_expected.to eq "1.2.3" } + it { is_expected.to be > "1.2.2" } + it { is_expected.to be > "1.2.3a" } + it { is_expected.to be < "1.2.4" } end - context 'with =~ Regexp' do + context "with =~ Regexp" do subject { described_object =~ /^1/ } it { is_expected.to eq 0 } end - context 'with =~ Requirement' do - subject { described_object =~ Gem::Requirement.create('~> 1.0') } + context "with =~ Requirement" do + subject { described_object =~ Gem::Requirement.create("~> 1.0") } it { is_expected.to be true } end - context 'with =~ String' do - subject { described_object =~ '~> 1.0' } + context "with =~ String" do + subject { described_object =~ "~> 1.0" } it { is_expected.to be true } end - context 'with Regexp =~' do + context "with Regexp =~" do subject { /^2/ =~ described_object } it { is_expected.to be nil } end - context 'with String =~' do - subject { '~> 1.0' =~ described_object } + context "with String =~" do + subject { "~> 1.0" =~ described_object } it { expect { subject }.to raise_error TypeError } end end |