Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
multirails & rcov tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Maddox committed Jan 7, 2010
1 parent 707c2ad commit dee06f9
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 103 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
*.log
pkg
coverage
2 changes: 2 additions & 0 deletions README
Expand Up @@ -46,6 +46,8 @@ You can spec the Person class in complete isolation.
end
end

Known to work against Rails versions >= 2.2.2 (run rake:multi_rails:all to test against versions installed on your machine)

Cool people who have contributed to NoPeepingToms:
* Brandon Keepers
* Corey Haines
Expand Down
16 changes: 16 additions & 0 deletions Rakefile
Expand Up @@ -23,3 +23,19 @@ Jeweler::Tasks.new do |s|
end

Jeweler::GemcutterTasks.new

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

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
spec.rcov_opts = ['--exclude', 'gems/,spec/']
end

task :spec => :check_dependencies
task :test => :spec
1 change: 1 addition & 0 deletions spec/host_app/app/controllers/application.rb
@@ -0,0 +1 @@
require 'application_controller'
8 changes: 0 additions & 8 deletions spec/host_app/app/controllers/application_controller.rb
@@ -1,10 +1,2 @@
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryProtection for details

# Scrub sensitive parameters from your log
# filter_parameter_logging :password
end
38 changes: 1 addition & 37 deletions spec/host_app/config/environment.rb
@@ -1,41 +1,5 @@
# Be sure to restart your server when you modify this file

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

Rails::Initializer.run do |config|
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.

# Add additional load paths for your own custom dirs
# config.load_paths += %W( #{RAILS_ROOT}/extras )

# Specify gems that this application depends on and have them installed with rake gems:install
# config.gem "bj"
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
# config.gem "sqlite3-ruby", :lib => "sqlite3"
# config.gem "aws-s3", :lib => "aws/s3"

# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]

# Skip frameworks you're not going to use. To use Rails without a database,
# you must remove the Active Record framework.
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]

# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer

# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names.
config.time_zone = 'UTC'

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
# config.i18n.default_locale = :de
config.frameworks = [:active_record]
end
7 changes: 0 additions & 7 deletions spec/host_app/config/initializers/backtrace_silencers.rb

This file was deleted.

10 changes: 0 additions & 10 deletions spec/host_app/config/initializers/inflections.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/host_app/config/initializers/mime_types.rb

This file was deleted.

21 changes: 0 additions & 21 deletions spec/host_app/config/initializers/new_rails_defaults.rb

This file was deleted.

15 changes: 0 additions & 15 deletions spec/host_app/config/initializers/session_store.rb

This file was deleted.

3 changes: 3 additions & 0 deletions spec/spec_helper.rb
@@ -1,3 +1,6 @@
require 'rubygems'
require 'multi_rails'
require 'multi_rails_init'
require File.expand_path(File.dirname(__FILE__) + '/host_app/spec/spec_helper')
$:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
require 'no_peeping_toms'
Expand Down

0 comments on commit dee06f9

Please sign in to comment.