Skip to content

Commit 55f7f35

Browse files
Tweak Makefile test commands to add file argument (#219)
2 parents ad08252 + ef37f93 commit 55f7f35

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

Makefile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ EXEC_CMD = $(COMPOSE_CMD) exec app
1717
# Default target
1818
help:
1919
@echo "$(BLUE)Available commands:$(RESET)"
20-
@echo " make build - Build image containers"
21-
@echo " make rebuild - Clean, build, start containers and prepare database"
22-
@echo " make stop [service] - Stop all containers or a specific service"
23-
@echo " make start [service] - Start all containers or a specific service"
24-
@echo " make restart [service] - Restart all containers or a specific service"
25-
@echo " make logs [service] - View logs of all containers or a specific service"
26-
@echo " make shell - Open a bash shell in the app container"
27-
@echo " make console - Start Rails console"
28-
@echo " make format - Auto-format code with Rubocop"
29-
@echo " make test - Run all tests"
30-
@echo " make test_fast - Run all tests and stop on first failure"
31-
@echo " make migrate - Run database migrations"
32-
@echo " make db_reset - Reset and rebuild database"
33-
@echo " make clean - Remove all containers and volumes"
34-
@echo " make clean_volumes - Remove all volumes"
20+
@echo " make build - Build image containers"
21+
@echo " make rebuild - Clean, build, start containers and prepare database"
22+
@echo " make stop [service] - Stop all containers or a specific service"
23+
@echo " make start [service] - Start all containers or a specific service"
24+
@echo " make restart [service] - Restart all containers or a specific service"
25+
@echo " make logs [service] - View logs of all containers or a specific service"
26+
@echo " make shell - Open a bash shell in the app container"
27+
@echo " make console - Start Rails console"
28+
@echo " make format - Auto-format code with Rubocop"
29+
@echo " make test [FILE=path] - Run all tests or specific file"
30+
@echo " make test_fast [FILE=path] - Run all tests or specific file and stop on first failure"
31+
@echo " make migrate - Run database migrations"
32+
@echo " make db_reset - Reset and rebuild database"
33+
@echo " make clean - Remove all containers and volumes"
34+
@echo " make clean_volumes - Remove all volumes"
3535

3636
build:
3737
$(COMPOSE_CMD) build
@@ -68,10 +68,10 @@ format:
6868
$(EXEC_CMD) bundle exec rubocop --autocorrect-all
6969

7070
test:
71-
$(COMPOSE_CMD) exec app bundle exec bash -c "export RAILS_ENV=test && rspec --format documentation"
71+
$(COMPOSE_CMD) exec app bundle exec bash -c "export RAILS_ENV=test && rspec --format documentation $(FILE)"
7272

7373
test_fast:
74-
$(COMPOSE_CMD) exec app bundle exec bash -c "export RAILS_ENV=test && rspec --format documentation --fail-fast"
74+
$(COMPOSE_CMD) exec app bundle exec bash -c "export RAILS_ENV=test && rspec --format documentation --fail-fast $(FILE)"
7575

7676
migrate:
7777
$(EXEC_CMD) bundle exec rails db:migrate

0 commit comments

Comments
 (0)