summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-04-24 14:06:04 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-08-26 13:37:50 -0700
commita0a10c565a7fe61b5c38f9480eb9cb3d6899e0f3 (patch)
treecd9765f0ef98fd349772a98cac0b8def98f28d8e
parentf5b57c72551fa6816383dae2fb7497272f2b5c58 (diff)
downloadohai-a0a10c565a7fe61b5c38f9480eb9cb3d6899e0f3.tar.gz
modernize specs with expect()
-rw-r--r--spec/unit/plugins/python_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/plugins/python_spec.rb b/spec/unit/plugins/python_spec.rb
index f8fddba7..89108e7a 100644
--- a/spec/unit/plugins/python_spec.rb
+++ b/spec/unit/plugins/python_spec.rb
@@ -28,7 +28,7 @@ describe Ohai::System, "plugin python" do
let(:plugin) do
plugin = get_plugin("python")
plugin[:languages] = Mash.new
- plugin.should_receive(:shell_out).with("python -c \"import sys; print (sys.version)\"").and_return(mock_shell_out(retval, stdout, ""))
+ expect(plugin).to receive(:shell_out).with("python -c \"import sys; print (sys.version)\"").and_return(mock_shell_out(retval, stdout, ""))
plugin
end
@@ -41,7 +41,7 @@ describe Ohai::System, "plugin python" do
it "should set languages[:python][:version]" do
plugin.run
- plugin.languages[:python][:version].should eql("2.5.2")
+ expect(plugin.languages[:python][:version]).to eql("2.5.2")
end
context "when the python command fails" do
@@ -49,7 +49,7 @@ describe Ohai::System, "plugin python" do
it "should not set the languages[:python] tree up" do
plugin.run
- plugin.languages.should_not have_key(:python)
+ expect(plugin.languages).not_to have_key(:python)
end
end
end