If you want run your spec, run this to your terminal:
rspec spec/
-
create a spec when user create a log with a duration of 10 and distance of 8, it shows a message: "Duration: 10 hour/s, Distance: 8 km/s."
-
describe "#count_logs"
- create a logs as much as you want
- it should count the total logs
- describe "#total_duration"
- create a logs as much as you want
- it should return the total duration
- "total_duration" seems to be not working properly. Investigate and fix the error.
- go to the file
lib/marathon_logs.rb
- fix the method called
tota_duration
- describe "#total_distance"
- create a logs as much as you want
- it should return the total distance
- after creating a spec for "#total_distance", in
lib/marathon_logs.rb
, sum all the total distance of the logs