diff options
| author | Tom Black <[email protected]> | 2015-11-13 00:26:17 -0500 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2015-11-13 00:26:17 -0500 |
| commit | 7a96ea1932a7d9a4dd4392bfad1f60c5beb06c33 (patch) | |
| tree | 3fb1f779fcd3fe28eb10beb46749ee8f1310d74d /Rakefile | |
| parent | dfe8e70159a3f2f47baceead173e55e9e29f91f7 (diff) | |
| download | ruby2d-7a96ea1932a7d9a4dd4392bfad1f60c5beb06c33.tar.gz ruby2d-7a96ea1932a7d9a4dd4392bfad1f60c5beb06c33.zip | |
Adding RSpec and some tests
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -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 |
