summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDanilo Sousa <dsgoncalves@uoldiveo.com>2016-07-20 07:00:31 -0300
committerDanilo Sousa <dsgoncalves@uoldiveo.com>2016-07-20 10:32:59 -0300
commitde2a9d18a5847439b40adfc0cc4c75e6cbf6262d (patch)
tree5cda65dc6210c89a4d85518c1c55e42034f8807d /spec
parent3310af0e9017eb7ea16ae19a98929ec5541890bf (diff)
fixed the #fetch and #verions web problems
apart from the refactorings, now the node path its correct even when groups are used
Diffstat (limited to 'spec')
-rw-r--r--spec/input/ssh_spec.rb1
-rw-r--r--spec/node_spec.rb5
-rw-r--r--spec/nodes_spec.rb1
3 files changed, 7 insertions, 0 deletions
diff --git a/spec/input/ssh_spec.rb b/spec/input/ssh_spec.rb
index 2550d5c..d86ffa0 100644
--- a/spec/input/ssh_spec.rb
+++ b/spec/input/ssh_spec.rb
@@ -5,6 +5,7 @@ describe Oxidized::SSH do
before(:each) do
Oxidized.asetus = Asetus.new
Oxidized.setup_logger
+ Oxidized::Node.any_instance.stubs(:resolve_repo)
Oxidized::Node.any_instance.stubs(:resolve_input)
Oxidized::Node.any_instance.stubs(:resolve_output)
@node = Oxidized::Node.new(name: 'example.com',
diff --git a/spec/node_spec.rb b/spec/node_spec.rb
index 1c38558..5cb5216 100644
--- a/spec/node_spec.rb
+++ b/spec/node_spec.rb
@@ -5,6 +5,7 @@ describe Oxidized::Node do
Oxidized.asetus = Asetus.new
Oxidized.setup_logger
+ Oxidized::Node.any_instance.stubs(:resolve_repo)
Oxidized::Node.any_instance.stubs(:resolve_output)
@node = Oxidized::Node.new(name: 'example.com',
input: 'ssh',
@@ -44,6 +45,10 @@ describe Oxidized::Node do
end
describe '#repo' do
+ before do
+ Oxidized::Node.any_instance.unstub(:resolve_repo)
+ end
+
let(:group) { nil }
let(:node) do
Oxidized::Node.new({
diff --git a/spec/nodes_spec.rb b/spec/nodes_spec.rb
index 4560bdb..6fa4b41 100644
--- a/spec/nodes_spec.rb
+++ b/spec/nodes_spec.rb
@@ -15,6 +15,7 @@ describe Oxidized::Nodes do
prompt: 'test_prompt'
}
+ Oxidized::Node.any_instance.stubs(:resolve_repo)
Oxidized::Node.any_instance.stubs(:resolve_output)
@nodes_org = %w(ltt-pe1.hel kes2-rr1.tku tor-peer1.oul
hal-p2.tre sav-gr1-sw1.kuo psl-sec-pe1.hel).map { |e| Oxidized::Node.new(opts.merge(name: e)) }