git-timecost/spec/commit_spec.cr

33 lines
618 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: Random::Secure.base64(40),
datetime: Time.utc,
author: author,
message: "First commit"
)
commit.should be_a(TimeCost::Commit)
end
end
describe ".date" do
end
describe ".author" do
end
describe ".note" do
end
end