puppetlabs/puppet — pull request #1367 by jeffmccune (2013-01-03 22:58:37+00:00)
Title: (maint) Skip IPv6 examples that cannot pass on MRI 1.9.3-p327

Without this patch applied the following examples fail on MRI 1.9.3-p327, but
not other versions.

Failures:

1) Puppet::Network::AuthStore::Declaration when the pattern is a valid IP
such as ::2:3:4:5:6:7:8 should match the specified IP
Failure/Error: @declaration =
Puppet::Network::AuthStore::Declaration.new(:allow_ip,ip)
ArgumentError:
invalid address
# ./lib/puppet/network/authstore.rb:252:in `new'
# ./lib/puppet/network/authstore.rb:252:in `parse_ip'
# ./lib/puppet/network/authstore.rb:171:in `pattern='
# ./lib/puppet/network/authstore.rb:151:in `initialize'
# ./spec/unit/network/authstore_spec.rb:304:in `new'
# ./spec/unit/network/authstore_spec.rb:304:in `block (4 levels) in '

2) Puppet::Network::AuthStore::Declaration when the pattern is a valid IP
such as ::2:3:4:5:6:7:8 should not match other IPs
Failure/Error: @declaration =
Puppet::Network::AuthStore::Declaration.new(:allow_ip,ip)
ArgumentError:
invalid address
# ./lib/puppet/network/authstore.rb:252:in `new'
# ./lib/puppet/network/authstore.rb:252:in `parse_ip'
# ./lib/puppet/network/authstore.rb:171:in `pattern='
# ./lib/puppet/network/authstore.rb:151:in `initialize'
# ./spec/unit/network/authstore_spec.rb:304:in `new'
# ./spec/unit/network/authstore_spec.rb:304:in `block (4 levels) in '

These failures are a result of Bug https://bugs.ruby-lang.org/issues/7477 in
MRI itself.

This patch addresses the problem by explicitly excluding the examples that
will fail because of the bugged Ruby interpreter. The patch targets very
specific patch level versions of MRI so that future and past MRI versions
will explicitly fail, notifying us when the root cause of the issue is
resolved.