Sha256: 0fbced7e183b3f25cfc3da7ff1a47621f8f29929ed2b9b90b7c1c97ba5991945
Contents?: true
Size: 1.53 KB
Versions: 6
Compression:
Stored size: 1.53 KB
Contents
require File.join(File.dirname(File.expand_path(__FILE__)), "/../spec_helper.rb") # TODO PlatformManager spec -- split entire spec into multiple, driver-specific ones. begin raise IndexError unless String === INTERPRETER.platform_manager.query("os") describe "AutomateIt::PlatformManager" do before(:all) do @a = AutomateIt.new @m = @a.platform_manager end it "should query os" do @m.query("os").should be_a_kind_of(String) end it "should query arch" do @m.query(:arch).should be_a_kind_of(String) end it "should query os and arch" do @m.query("os#arch").should be_a_kind_of(String) end begin raise IndexError unless String === INTERPRETER.platform_manager.query("distro") it "should query distro" do @m.query("distro").should be_a_kind_of(String) end it "should query release" do @m.query(:release).should be_a_kind_of(String) end it "should query combination of os, arch, distro and release" do result = @m.query("os#arch#distro#release") result.should be_a_kind_of(String) elements = result.split(/_/) elements.size.should >= 4 for element in elements element.should be_a_kind_of(String) element.size.should > 0 end end rescue NotImplementedError, IndexError puts "NOTE: Can't check 'distro' query on this platform, #{__FILE__}" end end rescue NotImplementedError, IndexError puts "NOTE: Can't check 'query' on this platform, #{__FILE__}" end
Version data entries
6 entries across 6 versions & 2 rubygems