Hi, On Mon, Aug 29, 2011 at 5:33 PM, Nick <[email protected]> wrote: > 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
In your gist, the describe block doesn't contain an "it" or "specify" block. Only a before(:each). Not sure if that's what's causing it, but it would be a place to start. Katrina > > Any help would be greatly appreciated. Thanks! > Nick -- You received this message because you are subscribed to the Google Groups "rspec" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rspec?hl=en.
