diff options
author | Thom May <thom@may.lt> | 2016-01-13 09:15:23 +0000 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-01-13 09:15:23 +0000 |
commit | 556e5f2d78b5c6de2f34d8dd655ee515ff317296 (patch) | |
tree | ebb17cb05d60e02f973262e58583993b6e429b26 /spec | |
parent | 67904eae428dcd2158bd3654fad7aec7c6875f20 (diff) | |
parent | 30895241dfde87d74e3caaf649a118ea2aa304d1 (diff) | |
download | chef-556e5f2d78b5c6de2f34d8dd655ee515ff317296.tar.gz |
Merge pull request #4388 from chef/lcg/more-rubocop-lint
more rubocop fixes
Diffstat (limited to 'spec')
-rw-r--r-- | spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb | 3 | ||||
-rw-r--r-- | spec/functional/run_lock_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/chef_fs/parallelizer.rb | 13 |
3 files changed, 8 insertions, 12 deletions
diff --git a/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb b/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb index f548ad1dd8..1130ee40e8 100644 --- a/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb +++ b/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb @@ -1,5 +1,3 @@ -raise "THIS METADATA HAS A BUG" - name 'invalid-metadata' maintainer '' maintainer_email '' @@ -8,3 +6,4 @@ description 'Installs/Configures invalid-metadata' long_description 'Installs/Configures invalid-metadata' version '0.1.0' +raise "THIS METADATA HAS A BUG" diff --git a/spec/functional/run_lock_spec.rb b/spec/functional/run_lock_spec.rb index 78b3847d19..f3156ff770 100644 --- a/spec/functional/run_lock_spec.rb +++ b/spec/functional/run_lock_spec.rb @@ -1,6 +1,6 @@ # # Author:: Daniel DeLeo (<dan@opscode.com>) -# Copyright:: Copyright (c) 2012 Opscode, Inc. +# Copyright:: Copyright (c) 2012-2016 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -321,7 +321,7 @@ describe Chef::RunLock do attr_reader :pid def last_event - while true + loop do line = readline_nonblock(read_from_process) break if line.nil? event, time = line.split("@") diff --git a/spec/unit/chef_fs/parallelizer.rb b/spec/unit/chef_fs/parallelizer.rb index 9cb97963ed..3ca4ee0092 100644 --- a/spec/unit/chef_fs/parallelizer.rb +++ b/spec/unit/chef_fs/parallelizer.rb @@ -205,14 +205,11 @@ describe Chef::ChefFS::Parallelizer do started = false @occupying_job_finished = occupying_job_finished = [ false ] @thread = Thread.new do - begin - parallelizer.parallelize([0], :main_thread_processing => false) do |x| - started = true - sleep(0.3) - occupying_job_finished[0] = true - end.wait - ensure - end + parallelizer.parallelize([0], :main_thread_processing => false) do |x| + started = true + sleep(0.3) + occupying_job_finished[0] = true + end.wait end while !started sleep(0.01) |