joshmcarthur / spree-import-products

A Spree extension to allow users to batch upload Products from a CSV file using Delayed Job
http://spreecommerce.com/extensions/103-import-products
BSD 3-Clause "New" or "Revised" License
80 stars 99 forks source link

tests and features : clean commit of PR #17 with 1_1_X #19

Open sbounmy opened 12 years ago

sbounmy commented 12 years ago

Hey @joshmcarthur,

I needed a clean merge #17 and #15 to push my features into production, so I decided to quickly merge #17 with 1_1_X branch and tests are green yay !

I am sorry if you were already working on it.

Please let me know if I can help, Stephane

joshmcarthur commented 12 years ago

@sbounmy,

I have spent some time getting these changes merged in, but it looks like you've beaten me to it! I'll pull down this PR tonight, and get the specs running. If everything looks good, I'll merge into 1_1_x.

Thanks!

sbounmy commented 12 years ago

hey @joshmcarthur looks like I can't use add_development_dependency for test env gems, it is complaning about missing faker etc when running specs, any thoughts ?

joshmcarthur commented 12 years ago

Hey @sbounmy,

Have you run bundle install? I didn't run into any problems myself… If you can't get it going, I'll have a shot tonight - it's quite a common pattern though, so it should work.

Another thing to try is make sure you're running you're specs through bundle exec - this should auto-require all the gems in the gem spec anyway before running the command.

sbounmy commented 12 years ago

my bad @joshmcarthur,

require 'ffaker' in spec_helper is needed when using gemspec dependency instead of gemfile !

joshmcarthur commented 12 years ago

Hi @sbounmy!

I've pulled your changes down and got the specs running - thanks for that. Most things look fine, but I've got a failing spec on line 20 of import_products_spec.rb - it looks like either the job isn't processing properly, or something is going a bit funny in the import - the product page is empty, when it should have the imported product on it.

I've pushed my merge branch to 1_1_x_merge if you have the chance to take a look and offer any pointers - otherwise, I'll carry on debugging this tonight.

sbounmy commented 12 years ago

Hi @joshmcarthur,

Thanks for merging !

Look like I can't reproduce your error, did you run rails generate delayed_job:active_record then rake db:migrate in spec/dummy ?

joshmcarthur commented 12 years ago

Hey @sbounmy,

Yep, did those things when I pulled it down. It looks to me like the job isn't enqueueing properly in Delayed Job - when I try and work_off the jobs, I get zero successes, but also zero failures, and no processing for that file shows up in the logfile.

Could you let me know what version of delayed_job you are using? That's the only thing I can think of right now that might be different.

sbounmy commented 12 years ago

hi @joshmcarthur, I have delayed_job (3.0.1) and delayed_job_active_record (0.3.2) !