Hey folks. I've been running into this problem a lot lately, and haven't 
been able to figure out what's causing it, nor how to fix it:

Failure/Error: @importer = SpreadsheetImporter.new @catalog, @excel, 
@photos_dir
NoMethodError:
  undefined method `each_pair' for #<Catalog:0xb885f08>
# ./app/models/spreadsheet_importer.rb:15:in `initialize'
# ./spec/models/spreadsheet_importer_spec.rb:25:in `new'
# ./spec/models/spreadsheet_importer_spec.rb:25:in `block (2 levels) in <top 
(required)>'

Line 15 of spreadsheet_importer.rb is:
@products_importer  = SpreadsheetImporter::Products.new catalog, spreadsheet

Line 25 of spreadsheet_importer_spec.rb is:
@importer = SpreadsheetImporter.new @catalog, @excel, @photos_dir

What perplexes me is that I've stubbed out the call to 
SpreadsheetImporter::Products.new , so the class' initializer isn't being 
called.

Here're some more complete code snippets:
https://gist.github.com/1178636

Any help would be greatly appreciated. Thanks!
Nick
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to