Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turingschool/rails_exercises
https://github.com/turingschool/rails_exercises
be-2 practice-project rails rails5
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/turingschool/rails_exercises
- Owner: turingschool
- Created: 2019-08-30T18:20:55.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-18T22:58:42.000Z (over 1 year ago)
- Last Synced: 2024-12-01T11:34:09.069Z (about 2 months ago)
- Topics: be-2, practice-project, rails, rails5
- Language: Ruby
- Homepage:
- Size: 69.3 KB
- Stars: 8
- Watchers: 11
- Forks: 25
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rails Exercises
This collection of exercises is for Turing students to practice Ruby on Rails concepts in isolation.
## Setup
1. Clone this repository
1. Run `bundle` from the command line### Exercises Setup
Currently, these exercises are included in this repo:
* controllers
* models
* routesEach group of exercises is located on a branch. In order to access these exercises, checkout out the branch (`git checkout controllers`). Note, if you list your branches using `git branch`, you will not see the branches listed at first. That's to be expected! You will still be able to check them out. Once you check out a branch, it will appear in your list of branches.
When switching between exercises on different branches, you may need to commit or stash your changes in order to checkout a new exercise branch. Don't be afraid to commit! Your changes will only be saved locally and will not affect the exercises for other students.
Some exercises contain database migrations, so apply them with:
```
rails db:create
rails db:migrate
```If you get a message saying the database already exists when running `rails db:create`, first drop the database with `rails db:drop`.
## Completing the Exercises
Each group of exercises has tests under `spec/features` and/or `spec/models`. Each test file begins with a number (ex: `1dog_spec.rb`). This number indicates the order in which you should complete the tests.
Run the tests individually with `rspec spec/models/1dog_spec.rb` for example. You can also skip tests by changing `it` blocks to `xit` which will be helpful for narrowing your focus. Additionally, you can run a specific test with `rspec spec/models/1dog_spec.rb:xyz` where `xyz` refers to the line number in the test file where the `it` is located.
## Contributing
If you find any bugs or have suggestions, we'd love to hear them! You can email `[email protected]` or slack `@Brian Zanti` in the Turing Slack Workspace.