I would like to build a test suite for my Spree app using FactoryGirl and RSpec. Should I write tests from scratch, or can I somehow make use of an existing resource so I don't end up duplicating code?
There are many _spec.rb files in spree/core/spec/models/spree. It would be great if could run rspec spec and run the core spree test suite plus any tests I write.
The Spree documentation recommends running bundle exec rake test_app to "build the appropriate test application inside of your spec directory." When I run that command, I receive this error message:
rake aborted! Don't know how to build task 'ecommerce' (see --tasks)
Spree is mounted in config/routes.db using this line: mount Spree::Core::Engine, at: '/'.
I would love to have the "appropriate files" so that I don't have to write many test that have been already written, but I am stumped. Thank you for any tips.
Aucun commentaire:
Enregistrer un commentaire