31 lines
603 B
Crystal
31 lines
603 B
Crystal
require "./spec_helper"
|
|
|
|
require "../src/timecost/author"
|
|
require "../src/timecost/commit"
|
|
|
|
describe TimeCost::Commit do
|
|
describe ".new" do
|
|
it "can be created from string" do
|
|
author = TimeCost::Author.new(
|
|
name: "Jon Snow",
|
|
email: "jon.snow@example.com"
|
|
)
|
|
|
|
commit = TimeCost::Commit.new(
|
|
commit_hash: "53c01d0db42ac662ed1aff3799d2a92a04e03908",
|
|
datetime: Time.utc,
|
|
author: author,
|
|
)
|
|
commit.should be_a(TimeCost::Commit)
|
|
end
|
|
end
|
|
|
|
describe ".date" do
|
|
end
|
|
|
|
describe ".author" do
|
|
end
|
|
|
|
describe ".note" do
|
|
end
|
|
end
|