Rails Engine is an e-commerce application that tracks merchants, customer, items, and invoices. Information is stored in a database and accessed via internal api between Front-End and Back-End pieces of the application.
- Exposing an API
- Use serializers to format JSON responses
- Test API exposure
- Compose advanced ActiveRecord queries to analyze information stored in SQL databases
- Ruby 2.5.3
- Rails 5.2.4.4
-
Create a directory (e.g. rails_engine) as a parent directory
-
cdinto that directory and run the following commands:- To clone the front end repo of this project that contains a test suite
git clone git@github.com:turingschool-examples/rails_driver.git- To clone the back end repo of this project
git clone git@github.com:jakeheft/rails_engine.gitBoth of these directories should live inside the parent directory you made
-
cdinto rails_engine (child directory) and runbundle installand thenrails g rspec:install -
From inside the rails_engine (child directory), run
rails db:{drop,create,migrate,seed}. To get the spec harness to pass (see 'Running Tests' below), you will need to have the database properly seeded.
To test the interconnectivity of this application with the Front-End application (rails_driver), run rails s while inside this project's root directory (rails_engine child directory). Then in another terminal window, run bundle exec rspec spec/features/harness_spec.rb to run the tests.
The Back-End has also been fully tested with 100% test coverage in SimpleCov.