diff --git a/README.md b/README.md index d8f1403..2929395 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,59 @@ Trabalhar com o desenvolvimento agil foi uma experiência muito boa. A divisão --- +## Execução dos Testes + +``` +Episode + should belong to season + should validate that :name cannot be empty/falsy + should validate that :number cannot be empty/falsy + should validate that :release_date cannot be empty/falsy + should validate that :summary cannot be empty/falsy + should validate that :number looks like a number greater than or equal to 1 + +Favorite + should belong to series_list + should belong to series + +Season + should belong to series + should have many episodes + should validate that :name cannot be empty/falsy + should validate that :number cannot be empty/falsy + should validate that :number looks like a number greater than or equal to 1 + +SeriesList + should have one user + should have many series + +Series + should validate that :title cannot be empty/falsy + should validate that :description cannot be empty/falsy + should validate that :year cannot be empty/falsy + should validate that :image_path cannot be empty/falsy + should have many seasons + +User + should belong to series_list + should validate that :name cannot be empty/falsy + should validate that :email cannot be empty/falsy + should validate that :password cannot be empty/falsy + +Finished in 1.32 seconds (files took 3.48 seconds to load) +24 examples, 0 failures + +Coverage report generated for RSpec to /home/rafael/ES022017/coverage. 53 / 53 LOC (100.0%) covered. +``` + +--- + +## Cobertura dos Testes Unitários + +![](docs/images/coverage.png) + +--- + ## Decisões de Projeto Obs: Como o cliente já havia deixado bastante claro como ele queria o produto, a maior parte das decisões tomadas foram de gerenciamento, como a divisão de tarefas por exemplo. diff --git a/coverage/.last_run.json b/coverage/.last_run.json index 2dbdba6..3cb5e70 100644 --- a/coverage/.last_run.json +++ b/coverage/.last_run.json @@ -1,5 +1,5 @@ { "result": { - "covered_percent": 98.04 + "covered_percent": 100.0 } } diff --git a/coverage/.resultset.json b/coverage/.resultset.json index 6db07d0..068ee0f 100644 --- a/coverage/.resultset.json +++ b/coverage/.resultset.json @@ -15,8 +15,8 @@ 1, null, 1, - 1, - 1, + 2, + 2, null ], "/home/rafael/ES022017/app/models/favorite.rb": [ @@ -29,18 +29,20 @@ 1, null, 1, - 1, + 2, + 2, null, - 1, - 1, + 2, + 2, null, 1, - 0, + 1, null, null, null ], "/home/rafael/ES022017/app/models/season.rb": [ + 1, 1, 1, null, @@ -52,8 +54,8 @@ 1, null, 1, - 1, - 1, + 2, + 2, null ], "/home/rafael/ES022017/app/models/series_list.rb": [ @@ -67,12 +69,12 @@ 1, null, 1, - 1, - 1, - 1, - 1, + 2, + 2, + 2, + 2, null, - 1, + 2, null ], "/home/rafael/ES022017/app/models/series.rb": [ @@ -89,14 +91,14 @@ 1, null, 1, - 1, + 2, null, - 1, - 1, - 1, + 2, + 2, + 2, null ] }, - "timestamp": 1511815560 + "timestamp": 1511819188 } } diff --git a/coverage/index.html b/coverage/index.html index 2948158..f4c2468 100644 --- a/coverage/index.html +++ b/coverage/index.html @@ -14,27 +14,27 @@ loading