From 40f6a3350542cca50a92859bf5f7d7c8522d6752 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Wed, 24 Sep 2014 20:10:12 +0200 Subject: [PATCH] Prepare for TDD (suite). --- Rakefile | 12 +++++++++++- specs/author_list_spec.rb | 10 ++++++++++ specs/spec_helper.rb | 12 ++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 specs/author_list_spec.rb create mode 100755 specs/spec_helper.rb diff --git a/Rakefile b/Rakefile index 809eb56..1c2876c 100644 --- a/Rakefile +++ b/Rakefile @@ -1,2 +1,12 @@ -require "bundler/gem_tasks" +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 +task :default => :test diff --git a/specs/author_list_spec.rb b/specs/author_list_spec.rb new file mode 100644 index 0000000..ed525b1 --- /dev/null +++ b/specs/author_list_spec.rb @@ -0,0 +1,10 @@ + + +require_relative 'spec_helper' +require 'minitest/spec' + +describe "simple failing test" do + it "fails" do + assert 1 < 0 + end +end diff --git a/specs/spec_helper.rb b/specs/spec_helper.rb new file mode 100755 index 0000000..77bb0e4 --- /dev/null +++ b/specs/spec_helper.rb @@ -0,0 +1,12 @@ + +require 'mark' +require 'minitest/unit' +require 'minitest/autorun' +require 'minitest/pride' + +#if __FILE__ == $0 +# $LOAD_PATH.unshift('lib', 'spec') +# Dir.glob('./spec/**/*_spec.rb') { |f| require f } +#end + +