Add profile class

This commit is contained in:
2019-11-03 19:45:48 +03:00
parent 3195a14bb3
commit e9fa65a8f7
3 changed files with 25 additions and 15 deletions

View File

@ -2,18 +2,14 @@ require "./spec_helper"
describe Dayoff do
it "can calc work hours" do
app = Dayoff::App.new(
"./spec/data/planned-dates.json",
"./spec/data/work-records.json",
)
app.get_planned_hours.should eq 20
app = Dayoff::App.new
prof = app.profile("./spec/data")
prof.get_planned_hours.should eq 20
end
it "can calc work hours" do
app = Dayoff::App.new(
"./spec/data/planned-dates.json",
"./spec/data/work-records.json",
)
app.get_work_hours.should eq 10
app = Dayoff::App.new
prof = app.profile("./spec/data")
prof.get_work_hours.should eq 10
end
end