summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorElvin Efendi <elvin.efendiev@shopify.com>2015-10-27 14:49:52 -0400
committerElvin Efendi <elvin.efendiev@shopify.com>2015-11-13 11:12:31 -0500
commitf2da63369fcb754e3715091cc4fd2f93db42106e (patch)
tree0e985374cc7b4bd8111c012072c39218335881ef /spec/spec_helper.rb
parent1400b842f6dc61e662ce15f72f578a55126ffc06 (diff)
better test framework, more specs and Travis CI
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000..28eb9d4
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,14 @@
+require 'minitest/autorun'
+require 'mocha/mini_test'
+require 'oxidized'
+
+Oxidized.mgr = Oxidized::Manager.new
+
+def stub_oxidized_ssh
+ Oxidized::SSH.any_instance.stubs(:connect).returns(true)
+ Oxidized::SSH.any_instance.stubs(:node).returns(@node)
+ Oxidized::SSH.any_instance.expects(:cmd).at_least(1).returns("this is a command output\nModel: mx960")
+ Oxidized::SSH.any_instance.stubs(:connect_cli).returns(true)
+ Oxidized::SSH.any_instance.stubs(:disconnect).returns(true)
+ Oxidized::SSH.any_instance.stubs(:disconnect_cli).returns(true)
+end