Hello I wrote the following spec file for my module:
require 'spec_helper' describe('apache_tomcat', :type => :class) do let(:node) { $fqdn } context 'with defaults for all parameters' do it { should compile } end end But when I run test I have the very strange error * NoMethodError: undefined method `split' for nil:NilClass* See below D:\project\infra\trunk\modules\apache_tomcat>rake spec D:/programs/Puppet/sys/ruby/bin/ruby.exe -I'D:/programs/Puppet/sys/ruby/lib/ruby /gems/2.0.0/gems/rspec-support-3.1.2/lib';'D:/programs/Puppet/sys/ruby/lib/ruby/ gems/2.0.0/gems/rspec-core-3.1.7/lib' D:/programs/Puppet/sys/ruby/lib/ruby/gems/ 2.0.0/gems/rspec-core-3.1.7/exe/rspec --pattern 'spec/{classes,defines,unit,func tions,hosts,integration}/**/*_spec.rb' --color F Failures: 1) apache_tomcat with defaults for all parameters Failure/Error: it { should compile } * NoMethodError: undefined method `split' for nil:NilClass # ./spec/classes/init_spec.rb:5:in `block (3 levels) in <top (required)>'* Deprecation Warnings: Filtering by an `:example_group` subhash is deprecated. Use the subhash to filte r directly instead. Called from D:/programs/Puppet/sys/ruby/lib/ruby/gems/2.0.0/ gems/rspec-puppet-1.0.1/lib/rspec-puppet/example.rb:12:in `block in <top (requir ed)>'. Filtering by an `:example_group` subhash is deprecated. Use the subhash to filte r directly instead. Called from D:/programs/Puppet/sys/ruby/lib/ruby/gems/2.0.0/ gems/rspec-puppet-1.0.1/lib/rspec-puppet/example.rb:16:in `block in <top (requir ed)>'. Filtering by an `:example_group` subhash is deprecated. Use the subhash to filte r directly instead. Called from D:/programs/Puppet/sys/ruby/lib/ruby/gems/2.0.0/ gems/rspec-puppet-1.0.1/lib/rspec-puppet/example.rb:20:in `block in <top (requir ed)>'. Too many uses of deprecated 'Filtering by an `:example_group` subhash'. Pass `-- deprecation-out` or set `config.deprecation_stream` to a file for full output. If you need more of the backtrace for any of these deprecations to identify where to make the necessary changes, you can configure `config.raise_errors_for_deprecations!`, and it will turn the deprecation warnings into errors, giving you the full backtrace. 4 deprecation warnings total Finished in 0.0156 seconds (files took 0.90295 seconds to load) 1 example, 1 failure Failed examples: rspec ./spec/classes/init_spec.rb:5 # apache_tomcat with defaults for all parameters D:/programs/Puppet/sys/ruby/bin/ruby.exe -I'D:/programs/Puppet/sys/ruby/lib/ruby /gems/2.0.0/gems/rspec-support-3.1.2/lib';'D:/programs/Puppet/sys/ruby/lib/ruby/ gems/2.0.0/gems/rspec-core-3.1.7/lib' D:/programs/Puppet/sys/ruby/lib/ruby/gems/ 2.0.0/gems/rspec-core-3.1.7/exe/rspec --pattern 'spec/{classes,defines,unit,func tions,hosts,integration}/**/*_spec.rb' --color failed Google did not give any hints. Any clue ? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8b2d9882-032d-43e5-a147-82505b37ff0e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.