Skip to content

Mikmik28/bootcamp-rspec-activity-2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSpec activity


If you want run your spec, run this to your terminal:

rspec spec/

Activity

  1. 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."

  2. describe "#count_logs"

  • create a logs as much as you want
  • it should count the total logs

Bonus Challenge!!!

  1. describe "#total_duration"
  • create a logs as much as you want
  • it should return the total duration
  1. "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
  1. describe "#total_distance"
  • create a logs as much as you want
  • it should return the total distance
  1. after creating a spec for "#total_distance", in lib/marathon_logs.rb, sum all the total distance of the logs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages