Calc work hours

This commit is contained in:
2019-11-03 11:57:38 +03:00
parent 3b93c725a3
commit 991396f68c
3 changed files with 42 additions and 6 deletions

14
spec/data/work-dates.json Normal file
View File

@ -0,0 +1,14 @@
[
{
"date": "2019-01-01",
"hours": 10
},
{
"date": "2019-01-02",
"hours": 6
},
{
"date": "2019-01-03",
"hours": 4
}
]

View File

@ -1,9 +1,8 @@
require "./spec_helper"
describe Dayoff do
# TODO: Write tests
it "works" do
false.should eq(true)
it "can calc work hours" do
app = Dayoff::App.new("./spec/data/work-dates.json")
app.get_work_hours.should eq 20
end
end