summaryrefslogtreecommitdiff
path: root/spec/functional/application_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2019-08-16 13:15:22 -0700
committerTim Smith <tsmith84@gmail.com>2019-08-16 13:15:22 -0700
commit54b3cc831750805f19f838d60dea25e23dfa2e8c (patch)
tree81f539fca05ca2d0ed0761011913cd852b46d450 /spec/functional/application_spec.rb
parent038fd847c6d75dfaf6e60b67de185732aa245cc3 (diff)
downloadohai-rspec.tar.gz
rspec updates from rubocop-rspecrspec
Autocorrects for a few different things that rubocop-rspec identified. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/functional/application_spec.rb')
-rw-r--r--spec/functional/application_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/functional/application_spec.rb b/spec/functional/application_spec.rb
index b222e532..5370c92c 100644
--- a/spec/functional/application_spec.rb
+++ b/spec/functional/application_spec.rb
@@ -25,12 +25,12 @@ RSpec.describe "Ohai::Application" do
let(:argv) { [] }
let(:stderr) { StringIO.new }
- before(:each) do
+ before do
@original_argv = ARGV.dup
ARGV.replace(argv)
end
- after(:each) do
+ after do
ARGV.replace(@original_argv)
end
@@ -40,13 +40,13 @@ RSpec.describe "Ohai::Application" do
let(:config_dir) { Dir.mktmpdir(".chef") }
let(:config_location) { File.join(config_dir, "config.rb") }
- before(:each) do
+ before do
File.open(config_location, "w+") do |f|
f.write(config_content)
end
end
- after(:each) do
+ after do
FileUtils.rm_rf(config_dir)
end
@@ -74,7 +74,7 @@ RSpec.describe "Ohai::Application" do
# https://github.com/chef/chef/blob/master/chef-config/lib/chef-config/workstation_config_loader.rb#L102
let(:env) { { "KNIFE_HOME" => config_dir } }
- before(:each) do
+ before do
allow_any_instance_of(ChefConfig::WorkstationConfigLoader)
.to receive(:env).and_return(env)
end