summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Vozar <christian@rogueethic.com>2014-06-04 15:15:53 -0500
committerBryan McLellan <btm@loftninjas.org>2014-07-14 15:22:36 -0400
commit15522b2f89120ab3ba2eabe427aa1d5d8a0aa263 (patch)
treee5501ef71c9e16c0ed853e9b33f643da8432a993
parentdacd7c6edcb895ee8070868a39081a04dddcef5e (diff)
downloadohai-15522b2f89120ab3ba2eabe427aa1d5d8a0aa263.tar.gz
Updated test specs
-rw-r--r--platform_simulation_specs/plugins/go_spec.rb30
-rw-r--r--spec/unit/plugins/go_spec.rb17
2 files changed, 31 insertions, 16 deletions
diff --git a/platform_simulation_specs/plugins/go_spec.rb b/platform_simulation_specs/plugins/go_spec.rb
new file mode 100644
index 00000000..239d0c4e
--- /dev/null
+++ b/platform_simulation_specs/plugins/go_spec.rb
@@ -0,0 +1,30 @@
+# Author:: Christian Vozar (<christian@rogueethic.com>)
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '/spec_helper.rb'))
+require File.expand_path( File.join( File.dirname( __FILE__ ), '..', 'common', 'ohai_plugin_common.rb' ))
+
+describe Ohai::System, "plugin go" do
+ test_plugin([ "languages", "go" ], [ "go" ]) do | p |
+ p.test([ "centos-6.4", "ubuntu-10.04", "ubuntu-12.04" ], [ "x86", "x64" ], [[]],
+ { "languages" => { "go" => nil }})
+ p.test([ "ubuntu-13.04" ], [ "x64" ], [[]],
+ { "languages" => { "go" => nil }})
+ p.test([ "centos-6.4", "ubuntu-10.04", "ubuntu-12.04" ], [ "x86", "x64" ], [[ "go" ]],
+ { "languages" => { "go" => { "version" => "0.10.2" }}})
+ p.test([ "ubuntu-13.04" ], [ "x64" ], [[ "go" ]],
+ { "languages" => { "go" => { "version" => "0.10.2" }}})
+ end
+end
diff --git a/spec/unit/plugins/go_spec.rb b/spec/unit/plugins/go_spec.rb
index 4ffa73ce..c6658d8a 100644
--- a/spec/unit/plugins/go_spec.rb
+++ b/spec/unit/plugins/go_spec.rb
@@ -13,8 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
-require File.expand_path(File.join(File.dirname(__FILE__), '..', 'path', 'ohai_plugin_common.rb'))
+require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '/spec_helper.rb'))
describe Ohai::System, "plugin go" do
@@ -42,18 +41,4 @@ describe Ohai::System, "plugin go" do
@plugin.languages.should_not have_key(:go)
end
- ##########
-
- require File.expand_path(File.dirname(__FILE__) + '/../path/ohai_plugin_common.rb')
-
- test_plugin([ "languages", "go" ], [ "go" ]) do | p |
- p.test([ "centos-6.4", "ubuntu-10.04", "ubuntu-12.04" ], [ "x86", "x64" ], [[]],
- { "languages" => { "go" => nil }})
- p.test([ "ubuntu-13.04" ], [ "x64" ], [[]],
- { "languages" => { "go" => nil }})
- p.test([ "centos-6.4", "ubuntu-10.04", "ubuntu-12.04" ], [ "x86", "x64" ], [[ "go" ]],
- { "languages" => { "go" => { "version" => "1.1.2" }}})
- p.test([ "ubuntu-13.04" ], [ "x64" ], [[ "go" ]],
- { "languages" => { "go" => { "version" => "1.1.2" }}})
- end
end