everydayrails / everydayrails-rspec-2017

Sample source for the 2017 edition of Everyday Rails Testing with RSpec.
http://rspectutorial.com
312 stars 247 forks source link

How to try the sample application in your browser #94

Open ruralocity opened 5 years ago

ruralocity commented 5 years ago

I received a request for more information about setting up the sample application in a local development environment. I recommend trying the application to get a better understanding of what's being tested throughout the book. See chapter 1 of the book for a list of the application's features. If you find this confusing/overwhelming, you may want to check out resources geared toward learning Rails itself, before digging into testing.

I tried to keep the sample application as simple as possible, to minimize extra dependencies, but you will need to install the following in order for the application to work:

Next, install the gem dependencies, if you haven't already, using your command line:

cd everydayrails-rspec-2017 
bundle install

Then, create databases for each environment and run migrations:

bin/rails db:create:all
bin/rails db:migrate

Finally, start the sample app:

bin/rails s

Click the Sign Up link to create an account for yourself in the sample application and create projects and tasks.

Future versions of the sample application and book will include a setup script to simplify this process.