Add basic specs

This commit is contained in:
Glenn Y. Rolland 2021-01-03 06:14:01 +01:00
parent 12c1c360b7
commit f425019347
4 changed files with 27 additions and 10 deletions

View file

@ -4,10 +4,13 @@ BUILD_DIR=_build
all: help
build: # ## build binary
build: ## build binary
mkdir -p $(BUILD_DIR)
crystal build -o $(BUILD_DIR)/$(PROGNAME) src/main.cr
test: ## test binary
crystal spec
help: ## print this help
@echo "Usage: make <target>"
@echo ""

12
spec/cli_spec.cr Normal file
View file

@ -0,0 +1,12 @@
require "spec"
require "../src/lib/cli"
describe Noozoid::Cli do
describe "#start" do
it "cshould respond to this method on class" do
{{ Noozoid::Cli.class.has_method?("start") }}.should be_true
end
end
end

View file

@ -1,9 +0,0 @@
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "namarara"
require "minitest/autorun"
require 'pathname'
def testfile(name)
Pathname.new(__FILE__).dirname.join('files', name)
end

11
spec/tui_spec.cr Normal file
View file

@ -0,0 +1,11 @@
require "spec"
require "../src/lib/tui"
describe Noozoid::Tui do
describe "#run" do
it "cshould respond to this method on class" do
{{ Noozoid::Tui.has_method?("run") }}.should be_true
end
end
end