Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue running tests #24

Closed
kamarcum opened this issue Jul 22, 2011 · 4 comments
Closed

Issue running tests #24

kamarcum opened this issue Jul 22, 2011 · 4 comments

Comments

@kamarcum
Copy link
Contributor

I cloned this repo a little bit ago, but I had some trouble running the tests. Steps to reproduce:

  1. New gemset
  2. git clone
  3. bundle
  4. rake -> failures because no db tables exist
  5. rake db:create -> Don't know how to build task 'app:db:create'
  6. rake -T -> db:setup and db:create both exist
  7. rake db:create -> failure
  8. rake db:setup -> failure
  9. head scratching
  10. grep -r database .
  11. spec/dummy/config/database.yml -> aha!
  12. cd spec/dummy; rake db:create db:migrate; cd ../..; rake -> only a few failures!
  13. cd spec/dummy; rake forem:install:migrations db:migrate; cd ../..; rake -> no failures!
  14. post github issue so others can work though this more easily
  15. await suggestions as to what I can do to help
@parndt
Copy link
Contributor

parndt commented Aug 31, 2011

I have trouble getting testing to work out of the box too!

@grigio
Copy link

grigio commented Sep 10, 2011

me too

@parndt
Copy link
Contributor

parndt commented Sep 10, 2011

It seems the steps are:

bundle exec rake -f spec/dummy/Rakefile db:drop db:create db:migrate
bundle exec rspec spec

Taken from the travis config.

It would be nice if running rake from the project did this for us or maybe this information could go in the README better. Would appreciate any and all patches that did this!! :-)

@radar
Copy link
Collaborator

radar commented Sep 15, 2011

The steps I use are similar to Phil's except I need to run the db:test:prepare task instead:

bundle exec rake -f spec/dummy/Rakefile db:drop db:create db:migrate db:test:prepare

This is a one time run thing, and once that's done then I run bundle exec rspec spec or bin/rspec spec or just ber spec (that's my alias) to run the tests.

@radar radar closed this as completed Sep 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants