The openbsd spec tests mistakenly used File.new instead of File.open.
Fix this to use .read, not .open.
(#15804) add zfs instances

Before this commit, `puppet resource zfs` would fail to list any zfs
entries since zfs provider did not provide a self.instances method. This
commit adds the self.instances method to the zfs provider.
Merge remote-tracking branch 'rahul/ticket/3.x/15804_solaris_zfs_instances' into 3.x

* rahul/ticket/3.x/15804_solaris_zfs_instances:
  (#15804) add zfs instances
Update CHANGELOG, conf/redhat/puppet.spec for 2.7.19rc2
Merge branch '2.7rc' into 2.7.x
Don't mask NoMethodErrors

This rescue was masking a bug in a provider (involving calling `[]` on
`nil.NilClass`) with a misleading error message.  The new code asks
permission rather than begging forgiveness, but is more specific to the
problem being detected.
(#10915) Fix tests to work with new parameter checking

The change to how the property checks if the provider can be called
caused several tests to fail because they were not using providers that
were able to properly report `respond_to?`. This fixes those tests. In
the case of the host_spec.rb I was able to convert away from a mock, but
in the mount_spec.rb the mock had to mock `respond_to?` since the
interaction with the provider seems to be more complicated than I can
unravel.
(#10915) Add test for provider throwing NoMethodError
Merge branch 'bug/2.7.x/10915-misleading-error-messages' into 2.7.x

* bug/2.7.x/10915-misleading-error-messages:
  (#10915) Add test for provider throwing NoMethodError
  (#10915) Fix tests to work with new parameter checking
  Don't mask NoMethodErrors
Merge remote-tracking branch 'upstream/2.7.x' into 3.x

* upstream/2.7.x:
  (#10915) Add test for provider throwing NoMethodError
  (#10915) Fix tests to work with new parameter checking
  Don't mask NoMethodErrors
  Update CHANGELOG, conf/redhat/puppet.spec for 2.7.19rc2

Conflicts:
	CHANGELOG
	conf/redhat/puppet.spec
(#15547) make sure that the LANG sentinels being used are present

previously, we used es_ES.UTF-8 as the sentinel value while checking for override
of LANG values in user environment. commands in solaris errors out when the LANG
being used is not present in the locales installed in the system.

This patch changes the lang sentinel being used to en_US.UTF-8 which is present in
a normal solaris install.

For checking the overriding, the procedure is to change the LANG to "C" which is
different from either so we modify the behavior of the test itself.
Merge remote-tracking branch 'rahul/ticket/3.x/15547_valid_lang_sentinels' into 3.x

* rahul/ticket/3.x/15547_valid_lang_sentinels:
  (#15547) make sure that the LANG sentinels being used are present
(#15569) ensure that augeas prints parse errors.

Ensure that loading augeas files prints parse errors if any.

This seems to have fallen through the cracks. It was originally
present in pull/733 ticket:14136

This fixes the build failure that was present in boxes that contained
augeas.
(#14515) Tests fail with mocha 0.11.4

Prior to this commit, these tests only worked with mocha 0.10.5 because
the tests were broken and trying to stub methods on nil, which mocha
0.11.4 no longer allows. After this commit, these tests work with both
mocha 0.10.5 and 0.11.4.
Fix stubbing on nil in some specs
Don't require mocha in spec_helper

Rspec will automatically require mocha, and it knows how to do it properly
depending on the mocha version. This eliminates spurious deprecation warnings
about how mocha is loaded.
Rename specs to end in _spec.rb
Avoid stubbing Thread::new due to issues in newer mocha

In mocha >= 0.11.0, unstubbing a method is done by defining a method that
calls the original method. Somehow this indirection causes issues when
Thread::new is stubbed, and the new thread does not have proper access to
local variables. This patch fixes this from both ends, by not stubbing
Thread::new and not using local variables in the test that was failing.
Check that function loading worked correctly.

In some odd circumstances - typically, just development errors - you can wind
up in a world where a function correctly loads but isn't available.

This ensures that the method is defined as expected and raises a clear, quick
error if not. The alternative is an unclear stack overflow raised because we
recurse forever through method_missing.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Conflicts:
	lib/puppet/parser/scope.rb