1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
4 describe 'has_ip_network function', :unless => ((fact('osfamily') == 'windows') or (fact('osfamily') == 'AIX')) do
6 it 'has_ip_network existing ipaddress' do
9 $o = has_ip_network($a)
10 notice(inline_template('has_ip_network is <%= @o.inspect %>'))
13 apply_manifest(pp, :catch_failures => true) do |r|
14 expect(r.stdout).to match(/has_ip_network is true/)
17 it 'has_ip_network absent ipaddress' do
20 $o = has_ip_network($a)
21 notice(inline_template('has_ip_network is <%= @o.inspect %>'))
24 apply_manifest(pp, :catch_failures => true) do |r|
25 expect(r.stdout).to match(/has_ip_network is false/)
30 it 'handles no arguments'
31 it 'handles non strings'