Class: Sloe::Expectations::Junos::HaveAllBgpPeersAs
- Inherits:
-
Object
- Object
- Sloe::Expectations::Junos::HaveAllBgpPeersAs
- Defined in:
- lib/sloe/expectations.rb
Instance Method Summary collapse
Instance Method Details
#failure_message ⇒ Object
113 114 115 |
# File 'lib/sloe/expectations.rb', line 113 def @no_match end |
#match(actual) ⇒ Object
104 105 106 107 108 109 110 111 |
# File 'lib/sloe/expectations.rb', line 104 def match(actual) @no_match = actual.xpath('//bgp-peer').each do |peer| if peer.xpath('peer-state').text != @state "#{peer.xpath('peer-address').text} state is #{peer.xpath('peer-state').text}" end end @no_match.size == 0 end |