spec/unit/plugins/linux/platform_spec.rb in ohai-8.13.0 vs spec/unit/plugins/linux/platform_spec.rb in ohai-8.14.0

- old
+ new

@@ -663,9 +663,16 @@ expect(File).to receive(:read).with("/etc/SuSE-release").and_return("openSUSE 12.2 (x86_64)\nVERSION = 12.2\nCODENAME = Mantis\n") @plugin.run expect(@plugin[:platform]).to eq("opensuse") expect(@plugin[:platform_family]).to eq("suse") end + + it "should read the platform as opensuseleap on openSUSE Leap" do + expect(File).to receive(:read).with("/etc/SuSE-release").and_return("openSUSE 42.1 (x86_64)\nVERSION = 42.1\nCODENAME = Malachite\n") + @plugin.run + expect(@plugin[:platform]).to eq("opensuseleap") + expect(@plugin[:platform_family]).to eq("suse") + end end end describe '#read_os_release_info' do let(:file_contents) { "COW=MOO\nDOG=\"BARK\"" }