From 3b65f582afe867180573313db3eb6450abf1da9b Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 18 Nov 2016 12:00:47 -0800 Subject: rspec-rubocop autofix the specs Signed-off-by: Tim Smith --- spec/unit/plugins/linux/cpu_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/unit/plugins/linux/cpu_spec.rb') diff --git a/spec/unit/plugins/linux/cpu_spec.rb b/spec/unit/plugins/linux/cpu_spec.rb index f6252453..e8f563a0 100644 --- a/spec/unit/plugins/linux/cpu_spec.rb +++ b/spec/unit/plugins/linux/cpu_spec.rb @@ -95,12 +95,12 @@ clflush size : 32 tempfile end - before(:each) do + before do allow(plugin).to receive(:collect_os).and_return(:linux) allow(File).to receive(:open).with("/proc/cpuinfo").and_return(tempfile_handle) end - after(:each) do + after do begin tempfile.close tempfile.unlink @@ -113,7 +113,7 @@ clflush size : 32 it "gets total cores" do plugin.run - expect(plugin[:cpu][:cores]).to eql(0) + expect(plugin[:cpu][:cores]).to be(0) end it "doesn't have a cpu 1" do @@ -314,7 +314,7 @@ end describe Ohai::System, "S390 linux cpu plugin" do let(:plugin) { get_plugin("linux/cpu") } - before(:each) do + before do allow(plugin).to receive(:collect_os).and_return(:linux) @double_file = double("/proc/cpuinfo") -- cgit v1.2.1