We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4559000 commit 464436eCopy full SHA for 464436e
1 file changed
Makefile
@@ -21,8 +21,9 @@ shell: ## Open a shell in the web container
21
console: ## Open Rails console in the web container
22
$(COMPOSE) exec web bin/rails console
23
24
-test: ## Run RSpec in the web container
25
- $(COMPOSE) exec web bundle exec rspec
+test: ## Run RSpec in the web container (uses test database)
+ $(COMPOSE) exec -e RAILS_ENV=test -e DATABASE_URL=postgresql://hackorum:hackorum@db:5432/hackorum_test web bin/rails db:prepare
26
+ $(COMPOSE) exec -e RAILS_ENV=test -e DATABASE_URL=postgresql://hackorum:hackorum@db:5432/hackorum_test web bundle exec rspec
27
28
db-migrate: ## Run db:migrate
29
$(COMPOSE) exec web bin/rails db:migrate
0 commit comments