From 46c8765c60fe9a22dba0e8ca7ac69435bf9f63b9 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Wed, 1 Aug 2018 10:22:24 +0100 Subject: [PATCH] Autofixes from rubocop There are a few remaining issues that need to be fixed, where the ruby code is ambiguous, or something else weird is going on. --- lib/puppet/_load_choria.rb | 4 +- lib/puppet/datatypes/choria/taskresult.rb | 4 +- lib/puppet/datatypes/choria/taskresults.rb | 4 +- lib/puppet/functions/choria/data.rb | 12 ++--- lib/puppet/functions/choria/discover.rb | 11 ++-- lib/puppet/functions/choria/in_groups_of.rb | 6 +-- lib/puppet/functions/choria/lock.rb | 8 +-- lib/puppet/functions/choria/on_error.rb | 4 +- lib/puppet/functions/choria/on_success.rb | 4 +- lib/puppet/functions/choria/run_playbook.rb | 12 ++--- lib/puppet/functions/choria/task.rb | 14 ++--- lib/puppet/functions/choria/tasks/metadata.rb | 10 ++-- .../functions/choria/tasks/validate_input.rb | 10 ++-- spec/classes/broker/service_spec.rb | 40 +++++++------- spec/classes/config_spec.rb | 50 ++++++++--------- spec/classes/init_spec.rb | 42 +++++++-------- spec/classes/install_spec.rb | 30 +++++------ spec/classes/repo_spec.rb | 54 +++++++++---------- spec/classes/service_spec.rb | 34 ++++++------ spec/functions/in_groups_of_spec.rb | 6 +-- 20 files changed, 179 insertions(+), 180 deletions(-) diff --git a/lib/puppet/_load_choria.rb b/lib/puppet/_load_choria.rb index 6e400d0..3f0eb5b 100644 --- a/lib/puppet/_load_choria.rb +++ b/lib/puppet/_load_choria.rb @@ -1,8 +1,8 @@ -["/opt/puppetlabs/mcollective/plugins", "C:/ProgramData/PuppetLabs/mcollective/plugins"].each do |libdir| +['/opt/puppetlabs/mcollective/plugins', 'C:/ProgramData/PuppetLabs/mcollective/plugins'].each do |libdir| next if $LOAD_PATH.include?(libdir) next unless File.directory?(libdir) $LOAD_PATH << libdir end -require "mcollective/util/bolt_support" +require 'mcollective/util/bolt_support' diff --git a/lib/puppet/datatypes/choria/taskresult.rb b/lib/puppet/datatypes/choria/taskresult.rb index 367b30f..5114c89 100644 --- a/lib/puppet/datatypes/choria/taskresult.rb +++ b/lib/puppet/datatypes/choria/taskresult.rb @@ -1,4 +1,4 @@ -Puppet::DataTypes.create_type("Choria::TaskResult") do +Puppet::DataTypes.create_type('Choria::TaskResult') do interface <<-PUPPET attributes => { "host" => Choria::Node, @@ -14,7 +14,7 @@ } PUPPET - require_relative "../../_load_choria" + require_relative '../../_load_choria' implementation_class MCollective::Util::BoltSupport::TaskResult end diff --git a/lib/puppet/datatypes/choria/taskresults.rb b/lib/puppet/datatypes/choria/taskresults.rb index d6c0028..a6759bd 100644 --- a/lib/puppet/datatypes/choria/taskresults.rb +++ b/lib/puppet/datatypes/choria/taskresults.rb @@ -1,4 +1,4 @@ -Puppet::DataTypes.create_type("Choria::TaskResults") do +Puppet::DataTypes.create_type('Choria::TaskResults') do interface <<-PUPPET attributes => { "results" => Array[Choria::TaskResult, 0], @@ -18,7 +18,7 @@ } PUPPET - require_relative "../../_load_choria" + require_relative '../../_load_choria' implementation_class MCollective::Util::BoltSupport::TaskResults end diff --git a/lib/puppet/functions/choria/data.rb b/lib/puppet/functions/choria/data.rb index 109ded8..3b19ce3 100644 --- a/lib/puppet/functions/choria/data.rb +++ b/lib/puppet/functions/choria/data.rb @@ -28,19 +28,19 @@ Puppet::Functions.create_function(:"choria::data", Puppet::Functions::InternalFunction) do dispatch :read do scope_param - param "String", :item - param "Hash", :properties + param 'String', :item + param 'Hash', :properties end dispatch :write do scope_param - param "String", :item - param "String", :value - param "Hash", :properties + param 'String', :item + param 'String', :value + param 'Hash', :properties end def init - require_relative "../../_load_choria" + require_relative '../../_load_choria' MCollective::Util::BoltSupport.init_choria end diff --git a/lib/puppet/functions/choria/discover.rb b/lib/puppet/functions/choria/discover.rb index 13c358a..a93b53b 100644 --- a/lib/puppet/functions/choria/discover.rb +++ b/lib/puppet/functions/choria/discover.rb @@ -43,23 +43,22 @@ Puppet::Functions.create_function(:"choria::discover", Puppet::Functions::InternalFunction) do dispatch :mcollective_discover do scope_param - param "Hash", :options + param 'Hash', :options end dispatch :discover do scope_param - param "String", :type - param "Hash", :options + param 'String', :type + param 'Hash', :options end def mcollective_discover(scope, options) - discover(scope, "mcollective", options) + discover(scope, 'mcollective', options) end def discover(scope, type, options) - require_relative "../../_load_choria" + require_relative '../../_load_choria' MCollective::Util::BoltSupport.init_choria.discover_nodes(scope, type, options) end end - diff --git a/lib/puppet/functions/choria/in_groups_of.rb b/lib/puppet/functions/choria/in_groups_of.rb index f3a6d3c..fb1b9d3 100644 --- a/lib/puppet/functions/choria/in_groups_of.rb +++ b/lib/puppet/functions/choria/in_groups_of.rb @@ -17,8 +17,8 @@ # will be done on the final yield to your lambda as shown above Puppet::Functions.create_function(:"choria::in_groups_of") do dispatch :handler do - param "Array", :items - param "Integer", :size + param 'Array', :items + param 'Integer', :size block_param end @@ -29,7 +29,7 @@ def handler(items, chunk_size) result = [] - count.times {|s| result << arr[s * chunk_size, chunk_size]} + count.times { |s| result << arr[s * chunk_size, chunk_size] } result.each_with_index do |a| yield(a) diff --git a/lib/puppet/functions/choria/lock.rb b/lib/puppet/functions/choria/lock.rb index 749378a..c14594d 100644 --- a/lib/puppet/functions/choria/lock.rb +++ b/lib/puppet/functions/choria/lock.rb @@ -26,13 +26,13 @@ Puppet::Functions.create_function(:"choria::lock", Puppet::Functions::InternalFunction) do dispatch :lock do scope_param - param "String", :item - param "Hash", :properties - block_param "Callable", :block + param 'String', :item + param 'Hash', :properties + block_param 'Callable', :block end def lock(scope, item, properties, &blk) - require_relative "../../_load_choria" + require_relative '../../_load_choria' MCollective::Util::BoltSupport.init_choria.data_lock(scope, item, properties, &blk) end diff --git a/lib/puppet/functions/choria/on_error.rb b/lib/puppet/functions/choria/on_error.rb index 82c5bec..9c069dc 100644 --- a/lib/puppet/functions/choria/on_error.rb +++ b/lib/puppet/functions/choria/on_error.rb @@ -42,9 +42,9 @@ # @return [Any] The data that was passed in Puppet::Functions.create_function(:"choria::on_error", Puppet::Functions::InternalFunction) do dispatch :handler do - param "Any", :results + param 'Any', :results block_param - return_type "Any" + return_type 'Any' end def handler(results) diff --git a/lib/puppet/functions/choria/on_success.rb b/lib/puppet/functions/choria/on_success.rb index 048e3ba..2431010 100644 --- a/lib/puppet/functions/choria/on_success.rb +++ b/lib/puppet/functions/choria/on_success.rb @@ -42,9 +42,9 @@ # @return [Any] The data that was passed in Puppet::Functions.create_function(:"choria::on_success", Puppet::Functions::InternalFunction) do dispatch :handler do - param "Choria::TaskResults", :results + param 'Choria::TaskResults', :results block_param - return_type "Choria::TaskResults" + return_type 'Choria::TaskResults' end def handler(results) diff --git a/lib/puppet/functions/choria/run_playbook.rb b/lib/puppet/functions/choria/run_playbook.rb index ce98202..51045d7 100644 --- a/lib/puppet/functions/choria/run_playbook.rb +++ b/lib/puppet/functions/choria/run_playbook.rb @@ -26,18 +26,18 @@ Puppet::Functions.create_function(:"choria::run_playbook", Puppet::Functions::InternalFunction) do dispatch :run_playbook do scope_param - param "String", :playbook - optional_param "Hash", :named_args + param 'String', :playbook + optional_param 'Hash', :named_args end def run_playbook(scope, playbook, named_args = {}) unless Puppet[:tasks] raise Puppet::ParseErrorWithIssue.from_issue_and_stack( - Puppet::Pops::Issues::TASK_OPERATION_NOT_SUPPORTED_WHEN_COMPILING, operation: "run_playbook" + Puppet::Pops::Issues::TASK_OPERATION_NOT_SUPPORTED_WHEN_COMPILING, operation: 'run_playbook' ) end - args = named_args.reject {|a| a.start_with?("_") } + args = named_args.reject { |a| a.start_with?('_') } result = [] begin @@ -49,9 +49,9 @@ def run_playbook(scope, playbook, named_args = {}) return results end rescue Puppet::Error - raise unless named_args["_catch_errors"] + raise unless named_args['_catch_errors'] - return MCollective::Util::BoltSupport::TaskResults.new([], $!) + return MCollective::Util::BoltSupport::TaskResults.new([], $ERROR_INFO) end raise(ArgumentError, "Function choria::run_playbook(): Unknown playbook: '%s'" % playbook) diff --git a/lib/puppet/functions/choria/task.rb b/lib/puppet/functions/choria/task.rb index feb3b48..afb6181 100644 --- a/lib/puppet/functions/choria/task.rb +++ b/lib/puppet/functions/choria/task.rb @@ -37,23 +37,23 @@ Puppet::Functions.create_function(:"choria::task", Puppet::Functions::InternalFunction) do dispatch :run_task do scope_param - param "String", :type - param "Hash", :properties - return_type "Choria::TaskResults" + param 'String', :type + param 'Hash', :properties + return_type 'Choria::TaskResults' end dispatch :run_mcollective_task do scope_param - param "Hash", :properties - return_type "Choria::TaskResults" + param 'Hash', :properties + return_type 'Choria::TaskResults' end def run_mcollective_task(scope, properties) - run_task(scope, "mcollective", properties) + run_task(scope, 'mcollective', properties) end def run_task(scope, type, properties) - require_relative "../../_load_choria" + require_relative '../../_load_choria' MCollective::Util::BoltSupport.init_choria.run_task(scope, type, properties) end diff --git a/lib/puppet/functions/choria/tasks/metadata.rb b/lib/puppet/functions/choria/tasks/metadata.rb index e84d4a7..95e37c5 100644 --- a/lib/puppet/functions/choria/tasks/metadata.rb +++ b/lib/puppet/functions/choria/tasks/metadata.rb @@ -5,17 +5,17 @@ # the required Puppet Server configuration were complete Puppet::Functions.create_function(:"choria::tasks::metadata") do dispatch :fetch do - param "String", :task + param 'String', :task end def init - require_relative "../../../_load_choria" + require_relative '../../../_load_choria' end def choria @_choria ||= begin - init - MCollective::Util::Choria.new + init + MCollective::Util::Choria.new end end @@ -24,6 +24,6 @@ def tasks_support end def fetch(task) - tasks_support.task_metadata(task, "production") + tasks_support.task_metadata(task, 'production') end end diff --git a/lib/puppet/functions/choria/tasks/validate_input.rb b/lib/puppet/functions/choria/tasks/validate_input.rb index c42343a..985b742 100644 --- a/lib/puppet/functions/choria/tasks/validate_input.rb +++ b/lib/puppet/functions/choria/tasks/validate_input.rb @@ -3,18 +3,18 @@ # @returns [Boolean] Puppet::Functions.create_function(:"choria::tasks::validate_input") do dispatch :validate do - param "Hash", :input - param "Hash", :metadata + param 'Hash', :input + param 'Hash', :metadata end def init - require_relative "../../../_load_choria" + require_relative '../../../_load_choria' end def choria @_choria ||= begin - init - MCollective::Util::Choria.new + init + MCollective::Util::Choria.new end end diff --git a/spec/classes/broker/service_spec.rb b/spec/classes/broker/service_spec.rb index bedf1f5..f811a8d 100644 --- a/spec/classes/broker/service_spec.rb +++ b/spec/classes/broker/service_spec.rb @@ -1,41 +1,41 @@ -require "spec_helper" +require 'spec_helper' -describe("choria::broker::service") do +describe('choria::broker::service') do before(:each) do - Puppet::Parser::Functions.newfunction(:assert_private, :type => :rvalue) {|_| } + Puppet::Parser::Functions.newfunction(:assert_private, type: :rvalue) { |_| } end let(:facts) do { - "aio_agent_version" => "1.7.0", - "operatingsystem" => "CentOS", - "osfamily" => "RedHat", - "operatingsystemmajrelease" => "7", - "os" => { - "family" => "RedHat" - } + 'aio_agent_version' => '1.7.0', + 'operatingsystem' => 'CentOS', + 'osfamily' => 'RedHat', + 'operatingsystemmajrelease' => '7', + 'os' => { + 'family' => 'RedHat', + }, } end - context("when present") do + context('when present') do let(:pre_condition) { 'class {"choria": }' } - it { should compile.with_all_deps } + it { is_expected.to compile.with_all_deps } - it "should use the correct ensure value" do - is_expected.to contain_service("choria-broker").with_ensure("running") - is_expected.to contain_service("choria-broker").with_enable(true) + it 'uses the correct ensure value' do + is_expected.to contain_service('choria-broker').with_ensure('running') + is_expected.to contain_service('choria-broker').with_enable(true) end end - context("when absent") do + context('when absent') do let(:pre_condition) { 'class {"choria": ensure => "absent"}' } - it { should compile.with_all_deps } + it { is_expected.to compile.with_all_deps } - it "should use the correct ensure value" do - is_expected.to contain_service("choria-broker").with_ensure("stopped") - is_expected.to contain_service("choria-broker").with_enable(false) + it 'uses the correct ensure value' do + is_expected.to contain_service('choria-broker').with_ensure('stopped') + is_expected.to contain_service('choria-broker').with_enable(false) end end end diff --git a/spec/classes/config_spec.rb b/spec/classes/config_spec.rb index 019dd66..2653e50 100644 --- a/spec/classes/config_spec.rb +++ b/spec/classes/config_spec.rb @@ -1,43 +1,43 @@ -require "spec_helper" +require 'spec_helper' -describe("choria::config") do +describe('choria::config') do before(:each) do - Puppet::Parser::Functions.newfunction(:assert_private, :type => :rvalue) {|_| } + Puppet::Parser::Functions.newfunction(:assert_private, type: :rvalue) { |_| } end - let(:node) { "choria1.rspec.example.net" } + let(:node) { 'choria1.rspec.example.net' } let(:facts) do { - "aio_agent_version" => "1.7.0", - "operatingsystem" => "CentOS", - "osfamily" => "RedHat", - "operatingsystemmajrelease" => "7", - "networking" => { - "domain" => "rspec.example.net", - "fqdn" => "choria1.rspec.example.net" + 'aio_agent_version' => '1.7.0', + 'operatingsystem' => 'CentOS', + 'osfamily' => 'RedHat', + 'operatingsystemmajrelease' => '7', + 'networking' => { + 'domain' => 'rspec.example.net', + 'fqdn' => 'choria1.rspec.example.net', + }, + 'os' => { + 'family' => 'RedHat', }, - "os" => { - "family" => "RedHat" - } } end let(:pre_condition) { 'class {"choria": }' } - context("default server config") do - it "should work out of the box" do - is_expected.to contain_file("/etc/choria/server.conf") - .with_content(/logfile = .var.log.choria.log/) - .with_content(/loglevel = warn/) - .with_content(/identity = choria1.rspec.example.net/) - .with_content(/plugin.choria.srv_domain = rspec.example.net/) - .with_content(/collectives = mcollective/) + context('default server config') do + it 'works out of the box' do + is_expected.to contain_file('/etc/choria/server.conf') + .with_content(%r{logfile = .var.log.choria.log}) + .with_content(%r{loglevel = warn}) + .with_content(%r{identity = choria1.rspec.example.net}) + .with_content(%r{plugin.choria.srv_domain = rspec.example.net}) + .with_content(%r{collectives = mcollective}) .with_content(/classesfile = \/opt\/puppetlabs\/puppet\/cache\/state\/classes.txt/) end - it "should include the agent shim" do - is_expected.to contain_file("/usr/bin/choria_mcollective_agent_compat.rb") - .with_mode("0755") + it 'includes the agent shim' do + is_expected.to contain_file('/usr/bin/choria_mcollective_agent_compat.rb') + .with_mode('0755') end end end diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 7590fbe..a313602 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -1,51 +1,51 @@ -require "spec_helper" +require 'spec_helper' -describe("choria") do +describe('choria') do before(:each) do - Puppet::Parser::Functions.newfunction(:assert_private, :type => :rvalue) {|_| } + Puppet::Parser::Functions.newfunction(:assert_private, type: :rvalue) { |_| } end let(:facts) do { - "aio_agent_version" => "1.7.0", - "os" => { - "family" => "RedHat" - } + 'aio_agent_version' => '1.7.0', + 'os' => { + 'family' => 'RedHat', + }, } end - it { should compile.with_all_deps } + it { is_expected.to compile.with_all_deps } - context("repo") do - it "should not manage the repo by default" do - is_expected.to_not contain_class("choria::repo") + context('repo') do + it 'does not manage the repo by default' do + is_expected.not_to contain_class('choria::repo') end context do let(:params) do { - "manage_package_repo" => true + 'manage_package_repo' => true, } end - it "should support managing the repo by default" do - is_expected.to contain_class("choria::repo").with_nightly(false) - is_expected.to contain_class("choria::repo").with_ensure("present") + it 'supports managing the repo by default' do + is_expected.to contain_class('choria::repo').with_nightly(false) + is_expected.to contain_class('choria::repo').with_ensure('present') end end context do let(:params) do { - "manage_package_repo" => true, - "nightly_repo" => true, - "ensure" => "absent" + 'manage_package_repo' => true, + 'nightly_repo' => true, + 'ensure' => 'absent', } end - it "should manage nightlys and ensure" do - is_expected.to contain_class("choria::repo").with_nightly(true) - is_expected.to contain_class("choria::repo").with_ensure("absent") + it 'manages nightlys and ensure' do + is_expected.to contain_class('choria::repo').with_nightly(true) + is_expected.to contain_class('choria::repo').with_ensure('absent') end end end diff --git a/spec/classes/install_spec.rb b/spec/classes/install_spec.rb index 0740039..2f4eca3 100644 --- a/spec/classes/install_spec.rb +++ b/spec/classes/install_spec.rb @@ -1,36 +1,36 @@ -require "spec_helper" +require 'spec_helper' -describe("choria::install") do +describe('choria::install') do before(:each) do - Puppet::Parser::Functions.newfunction(:assert_private, :type => :rvalue) {|_| } + Puppet::Parser::Functions.newfunction(:assert_private, type: :rvalue) { |_| } end let(:facts) do { - "aio_agent_version" => "1.7.0", - "os" => { - "family" => "RedHat" - } + 'aio_agent_version' => '1.7.0', + 'os' => { + 'family' => 'RedHat', + }, } end - context("when present") do + context('when present') do let(:pre_condition) { 'class {"choria": version => "1.2.3"}' } - it { should compile.with_all_deps } + it { is_expected.to compile.with_all_deps } - it "should use the correct ensure value" do - is_expected.to contain_package("choria").with_ensure("1.2.3") + it 'uses the correct ensure value' do + is_expected.to contain_package('choria').with_ensure('1.2.3') end end - context("when absent") do + context('when absent') do let(:pre_condition) { 'class {"choria": ensure => "absent", version => "1.2.3"}' } - it { should compile.with_all_deps } + it { is_expected.to compile.with_all_deps } - it "should use the correct ensure value" do - is_expected.to contain_package("choria").with_ensure("absent") + it 'uses the correct ensure value' do + is_expected.to contain_package('choria').with_ensure('absent') end end end diff --git a/spec/classes/repo_spec.rb b/spec/classes/repo_spec.rb index bdcbac6..203ebad 100644 --- a/spec/classes/repo_spec.rb +++ b/spec/classes/repo_spec.rb @@ -1,58 +1,58 @@ -require "spec_helper" +require 'spec_helper' -describe("choria::repo") do +describe('choria::repo') do before(:each) do - Puppet::Parser::Functions.newfunction(:assert_private, :type => :rvalue) {|_| } + Puppet::Parser::Functions.newfunction(:assert_private, type: :rvalue) { |_| } end let(:facts) do { - "aio_agent_version" => "1.7.0", - "os" => { - "family" => "RedHat" - } + 'aio_agent_version' => '1.7.0', + 'os' => { + 'family' => 'RedHat', + }, } end - context("when managing a redhat family node") do + context('when managing a redhat family node') do let(:facts) do { - "aio_agent_version" => "1.7.0", - "os" => { - "family" => "RedHat" - } + 'aio_agent_version' => '1.7.0', + 'os' => { + 'family' => 'RedHat', + }, } end - it { should compile.with_all_deps } + it { is_expected.to compile.with_all_deps } - it "should manage the main repo" do - is_expected.to contain_yumrepo("choria_release").with_ensure("present") + it 'manages the main repo' do + is_expected.to contain_yumrepo('choria_release').with_ensure('present') end - context("nightlys") do + context('nightlys') do let(:params) do - { :nightly => true } + { nightly: true } end - it "should support nightlys repo" do - is_expected.to contain_yumrepo("choria_release").with_ensure("present") - is_expected.to contain_yumrepo("choria_nightly").with_ensure("present") + it 'supports nightlys repo' do + is_expected.to contain_yumrepo('choria_release').with_ensure('present') + is_expected.to contain_yumrepo('choria_nightly').with_ensure('present') end end end - context("non redhat") do + context('non redhat') do let(:facts) do { - "aio_agent_version" => "1.7.0", - "os" => { - "distro" => {}, - "family" => "Unsupported" - } + 'aio_agent_version' => '1.7.0', + 'os' => { + 'distro' => {}, + 'family' => 'Unsupported', + }, } end - it { is_expected.to compile.and_raise_error(/Choria Repositories are not supported on Unsupported/) } + it { is_expected.to compile.and_raise_error(%r{Choria Repositories are not supported on Unsupported}) } end end diff --git a/spec/classes/service_spec.rb b/spec/classes/service_spec.rb index 7163cf0..8af67cb 100644 --- a/spec/classes/service_spec.rb +++ b/spec/classes/service_spec.rb @@ -1,39 +1,39 @@ -require "spec_helper" +require 'spec_helper' -describe("choria::service") do +describe('choria::service') do before(:each) do - Puppet::Parser::Functions.newfunction(:assert_private, :type => :rvalue) {|_| } + Puppet::Parser::Functions.newfunction(:assert_private, type: :rvalue) { |_| } end let(:facts) do { - "aio_agent_version" => "1.7.0", - "os" => { - "family" => "RedHat" - } + 'aio_agent_version' => '1.7.0', + 'os' => { + 'family' => 'RedHat', + }, } end - context("when enabled") do + context('when enabled') do let(:pre_condition) { 'class {"choria": server => true}' } - it { should compile.with_all_deps } + it { is_expected.to compile.with_all_deps } - it "should enable the service" do - is_expected.to contain_service("choria-server") - .with_ensure("running") + it 'enables the service' do + is_expected.to contain_service('choria-server') + .with_ensure('running') .with_enable(true) end end - context("by default") do + context('by default') do let(:pre_condition) { 'class {"choria": }' } - it { should compile.with_all_deps } + it { is_expected.to compile.with_all_deps } - it "should disable the service" do - is_expected.to contain_service("choria-server") - .with_ensure("stopped") + it 'disables the service' do + is_expected.to contain_service('choria-server') + .with_ensure('stopped') .with_enable(false) end end diff --git a/spec/functions/in_groups_of_spec.rb b/spec/functions/in_groups_of_spec.rb index 07adf1f..f931149 100644 --- a/spec/functions/in_groups_of_spec.rb +++ b/spec/functions/in_groups_of_spec.rb @@ -1,9 +1,9 @@ -require "spec_helper" +require 'spec_helper' -describe("choria::in_groups_of") do +describe('choria::in_groups_of') do it { seen = [] - is_expected.to run.with_params([1, 2, 3, 4, 5, 6, 7], 2).with_lambda {|items| + is_expected.to run.with_params([1, 2, 3, 4, 5, 6, 7], 2).with_lambda { |items| seen << items }