Skip to content

Commit

Permalink
fix style warnings with latest rubocop
Browse files Browse the repository at this point in the history
Signed-off-by: Thom May <thom@chef.io>
  • Loading branch information
Thom May committed Jun 13, 2018
1 parent 9a6bd80 commit f1dbd1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
4 changes: 1 addition & 3 deletions Rakefile
Expand Up @@ -14,8 +14,6 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = "spec/**/*_spec.rb"
end

gem_spec = eval(File.read("mixlib-config.gemspec"))

begin
require "chefstyle"
require "rubocop/rake_task"
Expand All @@ -28,7 +26,7 @@ end

RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = "rdoc"
rdoc.title = "mixlib-config #{gem_spec.version}"
rdoc.title = "mixlib-config #{Mixlib::Config::VERSION}"
rdoc.rdoc_files.include("README*")
rdoc.rdoc_files.include("lib/**/*.rb")
end
16 changes: 8 additions & 8 deletions features/steps/config_steps.rb
Expand Up @@ -16,10 +16,10 @@
# limitations under the License.
#

Given /^a configuration class '(.+)'$/ do |classname|
Given(/^a configuration class '(.+)'$/) do |classname|
end

When /^I set '(.+)' to '(.+)' in configuration class '(.+)'$/ do |key, value, classname|
When(/^I set '(.+)' to '(.+)' in configuration class '(.+)'$/) do |key, value, classname|

#ConfigIt[key.to_sym] = value
if classname == "ConfigIt"
Expand All @@ -31,11 +31,11 @@
end
end

Then /^config option '(.+)' is '(.+)'$/ do |key, value|
Then(/^config option '(.+)' is '(.+)'$/) do |key, value|
ConfigIt[key.to_sym].should == value
end

Then /^in configuration class '(.+)' config option '(.+)' is '(.+)'$/ do |classname, key, value|
Then(/^in configuration class '(.+)' config option '(.+)' is '(.+)'$/) do |classname, key, value|
if classname == "ConfigIt"
ConfigIt[key.to_sym].should == value
elsif classname == "ConfigItToo"
Expand All @@ -45,21 +45,21 @@
end
end

When /^I set '(.+)' to:$/ do |key, foo_table|
When(/^I set '(.+)' to:$/) do |key, foo_table|
ConfigIt[key.to_sym] = Array.new
foo_table.hashes.each do |hash|
ConfigIt[key.to_sym] << hash["key"]
end
end

Then /^an array is returned for '(.+)'$/ do |key|
Then(/^an array is returned for '(.+)'$/) do |key|
ConfigIt[key.to_sym].should be_a_kind_of(Array)
end

Given /^a configuration file '(.+)'$/ do |filename|
Given(/^a configuration file '(.+)'$/) do |filename|
@config_file = File.join(File.dirname(__FILE__), "..", "support", filename)
end

When /^I load the configuration$/ do
When(/^I load the configuration$/) do
ConfigIt.from_file(@config_file)
end

0 comments on commit f1dbd1f

Please sign in to comment.