Skip to content

Commit b7c3857

Browse files
committed
fix(test): set rails environment for testing #195
1 parent 790a9a0 commit b7c3857

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RESET := \033[0m
1010

1111
# Commands configuration
1212
COMPOSE_CMD = COMPOSE_PROJECT_NAME=$(PROJECT_NAME) docker compose -f docker-compose.dev.yml
13-
DOCKER_TEST_CMD = $(COMPOSE_CMD) exec app bundle exec rspec --format documentation
13+
DOCKER_TEST_CMD = $(COMPOSE_CMD) exec app bundle exec bash -c "export RAILS_ENV=test && rspec --format documentation"
1414
EXEC_CMD = $(COMPOSE_CMD) exec app
1515

1616
.PHONY: help build rebuild stop start restart logs shell console format test test_fast db_reset migrate clean clean_volumes
@@ -69,7 +69,7 @@ format:
6969
$(EXEC_CMD) bundle exec rubocop --autocorrect-all
7070

7171
test:
72-
export RAILS_ENV=test $(DOCKER_TEST_CMD)
72+
$(DOCKER_TEST_CMD)
7373

7474
test_fast:
7575
$(DOCKER_TEST_CMD) --fail-fast

0 commit comments

Comments
 (0)