spec/unit/plugins/linux/platform_spec.rb in ohai-8.0.1 vs spec/unit/plugins/linux/platform_spec.rb in ohai-8.1.0

- old
+ new

@@ -168,10 +168,16 @@ @plugin.run expect(@plugin[:platform]).to eq("arch") expect(@plugin[:platform_family]).to eq("arch") end + it "should set platform_version to kernel release" do + expect(@plugin).to receive(:`).with('uname -r').and_return('3.18.2-2-ARCH') + @plugin.run + expect(@plugin[:platform_version]).to eq('3.18.2-2-ARCH') + end + end describe "on gentoo" do before(:each) do @plugin.lsb = nil @@ -195,9 +201,16 @@ it "should set platform and platform_family to exherbo" do @plugin.run expect(@plugin[:platform]).to eq("exherbo") expect(@plugin[:platform_family]).to eq("exherbo") end + + it "should set platform_version to kernel release" do + expect(@plugin).to receive(:`).with('uname -r').and_return('3.18.2-2-ARCH') + @plugin.run + expect(@plugin[:platform_version]).to eq('3.18.2-2-ARCH') + end + end describe "on redhat breeds" do describe "with lsb_release results" do it "should set the platform to redhat and platform_family to rhel even if the LSB name is something absurd but redhat like" do