]> gitweb.fluxo.info Git - puppet-stdlib.git/commit
(Maint) use PuppetlabsSpec::PuppetSeams.parser_scope
authorJeff McCune <jeff@puppetlabs.com>
Thu, 19 Jul 2012 23:14:37 +0000 (16:14 -0700)
committerJeff McCune <jeff@puppetlabs.com>
Thu, 19 Jul 2012 23:24:57 +0000 (16:24 -0700)
commit8a4e115ccb14d409878d46d456cc9b93fdc24867
treee7c706007de1e1b708ff5c9c1a68b49b570c72d0
parentf604bae98cb377b6fc55185d4eeae05d1c7876d2
(Maint) use PuppetlabsSpec::PuppetSeams.parser_scope

Without this patch all of the spec tests for parser functions in stdlib
would instantiate their own scope instances.  This is a problem because
the standard library is tightly coupled with the internal behavior of
Puppet.  Tight coupling like this creates failures when we change the
internal behavior of Puppet.  This is exactly what happened recently
when we changed the method signature for the initializer of
Puppet::Parser::Scope instances.

This patch fixes the problem by creating scope instances using the
puppet labs spec helper.  The specific method that provides scope
instances in Puppet-version-independent way is something like this:

 let(:scope) { PuppetlabsSpec::PuppetSeams.parser_scope }

This patch simply implements this across the board.
55 files changed:
spec/spec_helper.rb
spec/unit/puppet/parser/functions/abs_spec.rb
spec/unit/puppet/parser/functions/bool2num_spec.rb
spec/unit/puppet/parser/functions/capitalize_spec.rb
spec/unit/puppet/parser/functions/chomp_spec.rb
spec/unit/puppet/parser/functions/chop_spec.rb
spec/unit/puppet/parser/functions/delete_at_spec.rb
spec/unit/puppet/parser/functions/delete_spec.rb
spec/unit/puppet/parser/functions/downcase_spec.rb
spec/unit/puppet/parser/functions/empty_spec.rb
spec/unit/puppet/parser/functions/flatten_spec.rb
spec/unit/puppet/parser/functions/getvar_spec.rb
spec/unit/puppet/parser/functions/grep_spec.rb
spec/unit/puppet/parser/functions/has_key_spec.rb
spec/unit/puppet/parser/functions/hash_spec.rb
spec/unit/puppet/parser/functions/is_array_spec.rb
spec/unit/puppet/parser/functions/is_domain_name_spec.rb
spec/unit/puppet/parser/functions/is_float_spec.rb
spec/unit/puppet/parser/functions/is_hash_spec.rb
spec/unit/puppet/parser/functions/is_integer_spec.rb
spec/unit/puppet/parser/functions/is_ip_address_spec.rb
spec/unit/puppet/parser/functions/is_mac_address_spec.rb
spec/unit/puppet/parser/functions/is_numeric_spec.rb
spec/unit/puppet/parser/functions/is_string_spec.rb
spec/unit/puppet/parser/functions/join_spec.rb
spec/unit/puppet/parser/functions/keys_spec.rb
spec/unit/puppet/parser/functions/lstrip_spec.rb
spec/unit/puppet/parser/functions/member_spec.rb
spec/unit/puppet/parser/functions/merge_spec.rb
spec/unit/puppet/parser/functions/num2bool_spec.rb
spec/unit/puppet/parser/functions/parsejson_spec.rb
spec/unit/puppet/parser/functions/parseyaml_spec.rb
spec/unit/puppet/parser/functions/prefix_spec.rb
spec/unit/puppet/parser/functions/range_spec.rb
spec/unit/puppet/parser/functions/reverse_spec.rb
spec/unit/puppet/parser/functions/rstrip_spec.rb
spec/unit/puppet/parser/functions/shuffle_spec.rb
spec/unit/puppet/parser/functions/size_spec.rb
spec/unit/puppet/parser/functions/sort_spec.rb
spec/unit/puppet/parser/functions/squeeze_spec.rb
spec/unit/puppet/parser/functions/str2bool_spec.rb
spec/unit/puppet/parser/functions/strftime_spec.rb
spec/unit/puppet/parser/functions/strip_spec.rb
spec/unit/puppet/parser/functions/swapcase_spec.rb
spec/unit/puppet/parser/functions/time_spec.rb
spec/unit/puppet/parser/functions/type_spec.rb
spec/unit/puppet/parser/functions/unique_spec.rb
spec/unit/puppet/parser/functions/upcase_spec.rb
spec/unit/puppet/parser/functions/validate_array_spec.rb
spec/unit/puppet/parser/functions/validate_bool_spec.rb
spec/unit/puppet/parser/functions/validate_hash_spec.rb
spec/unit/puppet/parser/functions/validate_string_spec.rb
spec/unit/puppet/parser/functions/values_at_spec.rb
spec/unit/puppet/parser/functions/values_spec.rb
spec/unit/puppet/parser/functions/zip_spec.rb