spec/methods_spec.rb in sloe-0.4.0 vs spec/methods_spec.rb in sloe-0.5.0

- old
+ new

@@ -11,11 +11,11 @@ :password => 'mcisamilf', :mib_dir => './mibs', :mib_modules => ["SNMPv2-SMI", "SNMPv2-MIB", "IF-MIB", "IP-MIB", "TCP-MIB", "UDP-MIB"].concat(@jnx_mibs) } - @dut = Sloe::Device.new(@args) + @dut = Sloe::Junos.new(@args) end context "SNMP API" do it "snmp.get_value() returns valid value" do @dut.snmp.get_value('sysDescr.0').should =~ /^Juniper Networks,/ @@ -60,8 +60,17 @@ it "scp.upload() functions without error" do File.new('/var/tmp/test', 'w+') lambda { @dut.scp.upload!('/var/tmp/test', 'test') }.should_not raise_error @dut.rpc.file_delete(:path => 'test') File.delete('/var/tmp/test') + end + end + + context "CLI API" do + it "cli.('show version') functions without error" do + lambda { @dut.cli("show version") }.should_not raise_error + end + it "cli.('show version') contains OS information" do + @dut.cli("show version").text.should =~ /JUNOS Base OS/ end end end \ No newline at end of file