summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorTom Black <[email protected]>2015-11-13 00:26:17 -0500
committerTom Black <[email protected]>2015-11-13 00:26:17 -0500
commit7a96ea1932a7d9a4dd4392bfad1f60c5beb06c33 (patch)
tree3fb1f779fcd3fe28eb10beb46749ee8f1310d74d /Rakefile
parentdfe8e70159a3f2f47baceead173e55e9e29f91f7 (diff)
downloadruby2d-7a96ea1932a7d9a4dd4392bfad1f60c5beb06c33.tar.gz
ruby2d-7a96ea1932a7d9a4dd4392bfad1f60c5beb06c33.zip
Adding RSpec and some tests
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/Rakefile b/Rakefile
index 022193e..e513ad5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,11 +1,17 @@
-# require 'rake/testtask'
+require 'rspec/core/rake_task'
task default: 'all'
-# Rake::TestTask.new do |t|
-# t.test_files = FileList['test/*_test.rb']
-# t.verbose = true
-# end
+def run_test(file)
+ Rake::Task['build'].invoke
+ Rake::Task['spec'].invoke
+ system "( cd tests/ ; ruby #{file}.rb )"
+end
+
+desc "Run the specs"
+RSpec::Core::RakeTask.new do |t|
+ t.pattern = "spec/*spec.rb"
+end
desc "Build Gem"
task :build do
@@ -27,8 +33,8 @@ task :testcard do
end
-desc "Test and Build"
+desc "Test and build"
task :all do
- # Rake::Task['test'].invoke
Rake::Task['build'].invoke
+ Rake::Task['spec'].invoke
end