Permalink
Browse files

More modern Rakefile and spec file organization

  • Loading branch information...
RISCfuture committed Oct 30, 2010
1 parent e698790 commit a59a89684ae69e279c5b04fa3d39a104c0ecd797
Showing with 15 additions and 16 deletions.
  1. +3 −13 Rakefile
  2. +1 −3 spec/enum_type_spec.rb
  3. +11 −0 spec/spec_helper.rb
View
@@ -20,7 +20,9 @@ Jeweler::Tasks.new do |gem|
end
Jeweler::GemcutterTasks.new
-desc "Build API documentation"
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new
+
YARD::Rake::YardocTask.new('doc') do |doc|
doc.options << "-m" << "textile"
doc.options << "--protected"
@@ -31,16 +33,4 @@ YARD::Rake::YardocTask.new('doc') do |doc|
doc.files = [ 'lib/**/*', 'README.textile' ]
end
-require 'rspec/core/rake_task'
-
-desc 'Run all RSpecs'
task(default: :spec)
-
-desc 'Run all RSpecs'
-RSpec::Core::RakeTask.new
-
-desc "Generate code coverage"
-RSpec::Core::RakeTask.new(:coverage) do |t|
- t.rcov = true
- t.rcov_opts = %w( --exclude spec )
-end
View
@@ -1,6 +1,4 @@
-Bundler.require :default, :test
-require "#{File.dirname __FILE__}/../lib/enum_type"
-require 'factories'
+require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
module SpecSupport
class EnumTypeTester
View
@@ -0,0 +1,11 @@
+Bundler.require :default, :test
+
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+
+require 'factories'
+require 'enum_type'
+
+RSpec.configure do |config|
+
+end

0 comments on commit a59a896

Please sign in to comment.