From c8da72a2c00771fec773c8b8788b8ca9eed28974 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Wed, 29 Oct 2014 23:31:11 +0100 Subject: [PATCH] Add base for specs. --- Rakefile | 12 ++++++++++++ spec/cli_spec.rb | 15 +++++++++++++++ spec/spec_helper.rb | 14 ++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 spec/cli_spec.rb create mode 100644 spec/spec_helper.rb diff --git a/Rakefile b/Rakefile index e55ff2e..60b484a 100644 --- a/Rakefile +++ b/Rakefile @@ -87,3 +87,15 @@ namespace :gem do rm_rf Dir.glob('pkg/*.gem') end end + +require 'rake' +require "bundler/gem_tasks" +require 'rake/testtask' + +Rake::TestTask.new do |t| + #t.warning = true + #t.verbose = true + t.libs << "spec" + t.test_files = FileList['spec/**/*_spec.rb'] +end + diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb new file mode 100644 index 0000000..4c633f9 --- /dev/null +++ b/spec/cli_spec.rb @@ -0,0 +1,15 @@ + +require_relative 'spec_helper' + +require 'qasim/cli' + +describe Qasim::CLI do + let(:cli) { Qasim::CLI.new } + + describe '.new' do + it "can be created without arguments" do + assert_instance_of Qasim::CLI, cli + end + end + +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..d8df416 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,14 @@ +#require 'mark' +# +require 'minitest/unit' +require 'minitest/autorun' +require 'minitest/spec' +require 'minitest/pride' + +$LOAD_PATH.unshift('../lib') + +#if __FILE__ == $0 +# $LOAD_PATH.unshift('lib', 'spec') +# Dir.glob('./spec/**/*_spec.rb') { |f| require f } +#end +