Add base for specs.
This commit is contained in:
parent
e91b668673
commit
c8da72a2c0
3 changed files with 41 additions and 0 deletions
12
Rakefile
12
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
|
||||
|
||||
|
|
15
spec/cli_spec.rb
Normal file
15
spec/cli_spec.rb
Normal file
|
@ -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
|
14
spec/spec_helper.rb
Normal file
14
spec/spec_helper.rb
Normal file
|
@ -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
|
||||
|
Loading…
Reference in a new issue