Skip to content

Commit

Permalink
Fixed rake tasks and cleaned up spec helper
Browse files Browse the repository at this point in the history
  • Loading branch information
beerlington committed Oct 17, 2010
1 parent c2ecf54 commit ee3e1a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
15 changes: 6 additions & 9 deletions Rakefile
Expand Up @@ -18,28 +18,25 @@ rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end

task :spec => :check_dependencies

task :default => :spec

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "classy_enum #{version}"
rdoc.title = "thegem #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
16 changes: 5 additions & 11 deletions spec/spec_helper.rb
Expand Up @@ -33,22 +33,11 @@ class Dog < ActiveRecord::Base
end

module FormtasticSpecHelper
include ActionPack
include ActionView::Context if defined?(ActionView::Context)
include ActionController::RecordIdentifier
include ActionView::Helpers::FormHelper
include ActionView::Helpers::FormTagHelper
include ActionView::Helpers::FormOptionsHelper
include ActionView::Helpers::UrlHelper
include ActionView::Helpers::TagHelper
include ActionView::Helpers::TextHelper
include ActionView::Helpers::DateHelper
include ActionView::Helpers::CaptureHelper
include ActionView::Helpers::AssetTagHelper
include ActiveSupport
include ActionView::Helpers::ActiveRecordHelper if defined?(ActionView::Helpers::ActiveRecordHelper)
include ActionView::Helpers::ActiveModelHelper if defined?(ActionView::Helpers::ActiveModelHelper)
include ActionController::PolymorphicRoutes if defined?(ActionController::PolymorphicRoutes)
include Formtastic::SemanticFormHelper

def self.included(base)
Expand All @@ -65,3 +54,8 @@ def protect_against_forgery?

end

module ActionView
class OutputBuffer < ActiveSupport::SafeBuffer
end
end

0 comments on commit ee3e1a7

Please sign in to comment.