summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/linux/cpu_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2016-11-18 12:00:47 -0800
committerTim Smith <tsmith@chef.io>2016-12-01 10:58:06 -0800
commit3b65f582afe867180573313db3eb6450abf1da9b (patch)
tree4eadf04c5959ad39cb56e150f7fa510925b32168 /spec/unit/plugins/linux/cpu_spec.rb
parent5f43d30a38cee0a87c479988283a6bd934c07d01 (diff)
downloadohai-rubocop_rspec.tar.gz
rspec-rubocop autofix the specsrubocop_rspec
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/plugins/linux/cpu_spec.rb')
-rw-r--r--spec/unit/plugins/linux/cpu_spec.rb8
1 files changed, 4 insertions, 4 deletions
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")