Skip to content

Commit

Permalink
Add bin command to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leesheppard committed Nov 2, 2024
1 parent 9b3dbc0 commit d799e09
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ None (yet).

## Testing

A full test (Rspec and Rubocop) including database migrations can be run with:

`bin/rails test`

Tests are written in RSpec. They are located in the `spec` directory and can be run with:

`bin/rspec`

## Development Environment
Expand All @@ -31,22 +37,22 @@ $ bin/dev

## Production Environment

This website is hosted on Heroku
This website is hosted on Heroku and is deployed automatically when a new commit is pushed to the main branch.

You can see it in action here:
[ruby australia](https://ruby.org.au)

## Known Issues / Gotchas

None (yet).
None (yet) but please see [CONTRIBUTING.md](CONTRIBUTING.md)

## Code of Conduct

See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for details.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## Content licence

Expand Down
14 changes: 14 additions & 0 deletions bin/tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e

echo "[ bin/tests ] Running migrations for Test env 🚨"
bin/rails db:migrate RAILS_ENV=test

echo "[ bin/tests ] Running Rspec tests 🚨🚨"
bundle exec rspec

echo "[ bin/tests ] Running Rubocop 👮"
bundle exec rubocop

echo "[ bin/tests ] Done"

0 comments on commit d799e09

Please sign in to comment.