From ea25f4eaea9e07b18c57176aeae243d428489343 Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Fri, 17 Apr 2020 08:02:32 +0200 Subject: [PATCH] Autocorrect new offenses --- lib/aruba/platforms/unix_environment_variables.rb | 2 +- spec/aruba/api/filesystem_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/aruba/platforms/unix_environment_variables.rb b/lib/aruba/platforms/unix_environment_variables.rb index 5843a2b10..54dcb8e74 100644 --- a/lib/aruba/platforms/unix_environment_variables.rb +++ b/lib/aruba/platforms/unix_environment_variables.rb @@ -9,7 +9,7 @@ class UpdateAction attr_reader :other_env, :block def initialize(other_env, &block) - @other_env = other_env.to_h.each_with_object({}) { |(k, v), a| a[k] = v.to_s } + @other_env = other_env.to_h.transform_values(&:to_s) @block = (block if block_given?) end diff --git a/spec/aruba/api/filesystem_spec.rb b/spec/aruba/api/filesystem_spec.rb index 30c2e1bef..17dbbd81f 100644 --- a/spec/aruba/api/filesystem_spec.rb +++ b/spec/aruba/api/filesystem_spec.rb @@ -541,7 +541,7 @@ def actual_permissions expect(full_content).to match(/foo/) expect(full_content).not_to match(/zoo/) end - end . not_to raise_error + end.not_to raise_error end it "raises ExpectationNotMetError when the inner expectations don't match" do @@ -550,7 +550,7 @@ def actual_permissions expect(full_content).to match(/zoo/) expect(full_content).not_to match(/foo/) end - end . to raise_error RSpec::Expectations::ExpectationNotMetError + end.to raise_error RSpec::Expectations::ExpectationNotMetError end end end