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
+
+
+
+---
+
## 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 @@
-
Generated
2017-11-27T18:46:00-02:00
+
Generated
2017-11-27T19:46:28-02:00
All Files
- (98.04%
+ (100.0%
covered at
-
- 0.99
+
+ 1.32
hits/line)
10 files in total.
- 51 relevant lines.
- 50 lines covered and
- 1 lines missed
+ 53 relevant lines.
+ 53 lines covered and
+ 0 lines missed
@@ -73,9 +73,9 @@
app/models/season.rb |
100.0 % |
- 6 |
- 4 |
- 4 |
+ 7 |
+ 5 |
+ 5 |
0 |
1.0 |
@@ -107,17 +107,17 @@
4 |
4 |
0 |
- 1.0 |
+ 1.5 |
spec/models/season_spec.rb |
- 85.71 % |
- 13 |
- 7 |
- 6 |
- 1 |
- 0.9 |
+ 100.0 % |
+ 14 |
+ 8 |
+ 8 |
+ 0 |
+ 1.5 |
@@ -127,7 +127,7 @@
4 |
4 |
0 |
- 1.0 |
+ 1.5 |
@@ -137,7 +137,7 @@
7 |
7 |
0 |
- 1.0 |
+ 1.7 |
@@ -147,7 +147,7 @@
6 |
6 |
0 |
- 1.0 |
+ 1.7 |
@@ -281,8 +281,8 @@ 100.0 % covered
app/models/season.rb
100.0 % covered
- 4 relevant lines.
- 4 lines covered and
+ 5 relevant lines.
+ 5 lines covered and
0 lines missed.
@@ -302,25 +302,31 @@ 100.0 % covered
belongs_to :series
-
+
+ 1
+
+ has_many :episodes
+
+
+
-
+
1
validates :name, presence: true
-
+
1
validates :number, presence: true, numericality: { greater_than_or_equal_to: 1 }
-
+
end
@@ -479,14 +485,14 @@ 100.0 % covered
RSpec.describe Favorite, type: :model do
-
- 1
+
+ 2
it { should belong_to :series_list }
-
- 1
+
+ 2
it { should belong_to :series }
@@ -505,11 +511,11 @@ 100.0 % covered
@@ -534,61 +540,67 @@
85.71 % covered
RSpec.describe Season, type: :model do
-
- 1
+
+ 2
it { should belong_to :series }
-
+
+ 2
+
+ it { should have_many :episodes }
+
+
+
-
- 1
+
+ 2
it { should validate_presence_of :name }
-
- 1
+
+ 2
it { should validate_presence_of :number }
-
+
-
+
1
it do
-
-
+
+ 1
should validate_numericality_of(:number).
-
+
is_greater_than_or_equal_to(1)
-
+
end
-
+
end
@@ -631,14 +643,14 @@ 100.0 % covered
RSpec.describe SeriesList, type: :model do
-
- 1
+
+ 2
it { should have_one :user }
-
- 1
+
+ 2
it { should have_many :series }
@@ -686,26 +698,26 @@ 100.0 % covered
RSpec.describe Series, type: :model do
-
- 1
+
+ 2
it { should validate_presence_of :title }
-
- 1
+
+ 2
it { should validate_presence_of :description }
-
- 1
+
+ 2
it { should validate_presence_of :year }
-
- 1
+
+ 2
it { should validate_presence_of :image_path }
@@ -716,8 +728,8 @@ 100.0 % covered
-
- 1
+
+ 2
it { should have_many :seasons }
@@ -765,8 +777,8 @@ 100.0 % covered
RSpec.describe User, type: :model do
-
- 1
+
+ 2
it { should belong_to :series_list }
@@ -777,20 +789,20 @@ 100.0 % covered
-
- 1
+
+ 2
it { should validate_presence_of :name }
-
- 1
+
+ 2
it { should validate_presence_of :email }
-
- 1
+
+ 2
it { should validate_presence_of :password }
diff --git a/docs/images/coverage.png b/docs/images/coverage.png
new file mode 100644
index 0000000..84505e3
Binary files /dev/null and b/docs/images/coverage.png differ