Puppet: System Administration Automated

Support

Ticket #1258 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

TypeError in Puppet::Indirector::REST test

Reported by: porridge Assigned to: community
Priority: normal Milestone:
Component: testing Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Attached Patches: None Complexity: Unknown

Description

TypeError in 'Puppet::Indirector::REST when using webrick when searching for model instances over REST when matching model instances can be found should return the instance of the model class associated with the provided lookup key'
wrong argument type Symbol (expected Proc)
/home/porridge/Desktop/coding/puppet-git/spec/integration/indirector/rest.rb:154:

Change History

05/22/08 10:37:16 changed by porridge

This is in the following code:

                it 'should return the instance of the model class associated with the provided lookup key' do
                    Puppet::TestIndirectedFoo.search('bar').collect(&:value).should == @model_instances.collect(&:value)
                end

If this is not a typo, then perhaps a ruby version incompatibility. Mine is ruby 1.8.5 (2006-08-25) [i486-linux]

05/26/08 03:22:45 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [eaa6eab].

This is a Railsism, and it works if Rails is loaded but not otherwise. I just removed the idiom, although really, Puppet should probably make the same monkey-patch that Rails does, since it's wicked-convenient.