ChefSpec - can't convert Symbol into Integer

Has anyone run across an error like this using ChefSpec?

Failures:

  1. apt::default should always update-notifier-common
    Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new.converge
    'apt::default' }
    TypeError:
    can't convert Symbol into Integer

    ./cookbooks/bluepill/attributes/default.rb:18:in `'

    ./cookbooks/bluepill/attributes/default.rb:18:in `from_file'

    ./cookbooks/apt/spec/default_spec.rb:10:in `block (2 levels) in <top

(required)>'
# ./cookbooks/apt/spec/default_spec.rb:14:in `block (2 levels) in <top
(required)>'

Finished in 6.6 seconds
1 example, 1 failure

Failed examples:

rspec ./cookbooks/apt/spec/default_spec.rb:12 # apt::default should always
update-notifier-common

Full Details:

https://github.com/acrmp/chefspec/issues/77

On Sunday, November 18, 2012 at 9:56 PM, Brian Scott wrote:

Has anyone run across an error like this using ChefSpec?

Failures:

  1. apt::default should always update-notifier-common
    Failure/Error: let(:chef_run) { ChefSpec::ChefRunner.new.converge 'apt::default' }
    TypeError:
    can't convert Symbol into Integer

    ./cookbooks/bluepill/attributes/default.rb:18:in `'

    ./cookbooks/bluepill/attributes/default.rb:18:in `from_file'

    ./cookbooks/apt/spec/default_spec.rb:10:in `block (2 levels) in <top (required)>'

    ./cookbooks/apt/spec/default_spec.rb:14:in `block (2 levels) in <top (required)>'

Finished in 6.6 seconds
1 example, 1 failure

Failed examples:

rspec ./cookbooks/apt/spec/default_spec.rb:12 # apt::default should always update-notifier-common

Full Details:

can't convert Symbol into Integer · Issue #77 · chefspec/chefspec · GitHub
Without looking at the cookbooks in question, it looks like you have an Array where you expected a Hash.

--
Daniel DeLeo