diff --git a/.travis.yml b/.travis.yml index 72a471d..d01bee4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,4 @@ rvm: script: - bundle exec rake install - bundle exec rake generate - - "cd lib && bundle install && bundle exec rake test" + - bundle exec rake test diff --git a/Gemfile b/Gemfile index b906e79..ed67ec9 100644 --- a/Gemfile +++ b/Gemfile @@ -18,4 +18,8 @@ group :development do gem 'rdiscount', '~> 1.6.8' end +group :test do + gem "minitest", "~> 4.6" +end + gem 'sinatra', '~> 1.3.3' diff --git a/Rakefile b/Rakefile index 1fa9738..e4f4903 100644 --- a/Rakefile +++ b/Rakefile @@ -8,6 +8,7 @@ require 'tzinfo' require 'rake/minify' require 'yaml' require 'octopress' +require "rake/testtask" ### Configuring Octopress: ### Under _config/ you will find: @@ -460,6 +461,13 @@ task :list_drafts do puts unpublished.empty? ? "There are no posts currently in draft" : unpublished end +# +# Run tests for Octopress module, found in lib/. +# +Rake::TestTask.new do |t| + t.pattern = "spec/**/*_spec.rb" +end + def get_unpublished(posts, options={}) result = "" message = options[:message] || "These Posts will not be published:" diff --git a/lib/Gemfile b/lib/Gemfile deleted file mode 100644 index ef12818..0000000 --- a/lib/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source "https://rubygems.org" - -gem "rake", "~> 10.0" - -group :test do - gem "minitest", "~> 4.6" -end diff --git a/lib/Rakefile b/lib/Rakefile deleted file mode 100644 index 48d3978..0000000 --- a/lib/Rakefile +++ /dev/null @@ -1,9 +0,0 @@ -$:.unshift File.dirname(__FILE__) # For use/testing when no gem is installed - -require "rubygems" -require "octopress" -require "rake/testtask" - -Rake::TestTask.new do |t| - t.pattern = "spec/**/*_spec.rb" -end