airavata-courses / TeamCodeRing

0 stars 0 forks source link

Integration testing with RSpec #14

Open PrashanthKumarM opened 7 years ago

PrashanthKumarM commented 7 years ago

Need to create integration tests for the Rails API with RSpec. Preferably all controller actions should be covered.

PrashanthKumarM commented 7 years ago

@patelparth30j Please see if you can take a hold of this.

nbisht7 commented 7 years ago

@patelparth30j , I will take this.

PrashanthKumarM commented 7 years ago

I have just added a bare bones rspec suite in the anemometer app. I have individual specs for each controller. We need at least one test for each controller action. please do:

bundle install --no-deployment

before anything and then change the "test" part of the db.yml to your local db credentials. Also create a new "weather_machine_test" database in your local db. You can write the tests and run it by:

bundle exec rspec spec

Pull in the "integration_testing" branch and checkout. After writing the tests before commiting the code please change the db.yml to what it was before. In any branch and any feature you are working on please remember to neglect the changes in db.yml before committing. https://github.com/airavata-courses/TeamCodeRing/tree/integration_testing