derailed-mole 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. data/History.txt +17 -0
  2. data/Manifest.txt +137 -0
  3. data/README.txt +216 -0
  4. data/Rakefile +46 -0
  5. data/bin/molify +64 -0
  6. data/config/database.yml +21 -0
  7. data/config/test_database.yml +69 -0
  8. data/lib/mole.rb +260 -0
  9. data/lib/mole/db/migrate.rb +90 -0
  10. data/lib/mole/e_mole.rb +75 -0
  11. data/lib/mole/e_mole_helper.rb +2 -0
  12. data/lib/mole/logger.rb +134 -0
  13. data/lib/mole/models/mole_feature.rb +58 -0
  14. data/lib/mole/models/mole_log.rb +31 -0
  15. data/lib/mole/module.rb +292 -0
  16. data/lib/mole/moler.rb +71 -0
  17. data/lib/mole/utils/frameworks.rb +53 -0
  18. data/lib/mole/version.rb +15 -0
  19. data/mole.gemspec +37 -0
  20. data/samples/merbapp/README +14 -0
  21. data/samples/merbapp/Rakefile +124 -0
  22. data/samples/merbapp/app/controllers/application.rb +3 -0
  23. data/samples/merbapp/app/controllers/exceptions.rb +13 -0
  24. data/samples/merbapp/app/controllers/moled.rb +25 -0
  25. data/samples/merbapp/app/helpers/global_helper.rb +5 -0
  26. data/samples/merbapp/app/mailers/views/layout/application.html.erb +1 -0
  27. data/samples/merbapp/app/mailers/views/layout/application.text.erb +1 -0
  28. data/samples/merbapp/app/parts/views/layout/application.html.erb +1 -0
  29. data/samples/merbapp/app/views/exceptions/internal_server_error.html.erb +216 -0
  30. data/samples/merbapp/app/views/exceptions/not_acceptable.html.erb +38 -0
  31. data/samples/merbapp/app/views/exceptions/not_found.html.erb +40 -0
  32. data/samples/merbapp/app/views/layout/application.html.erb +11 -0
  33. data/samples/merbapp/app/views/moled/index.html.erb +5 -0
  34. data/samples/merbapp/app/views/moled/result.html.erb +5 -0
  35. data/samples/merbapp/config/boot.rb +11 -0
  36. data/samples/merbapp/config/dependencies.rb +41 -0
  37. data/samples/merbapp/config/environments/development.rb +1 -0
  38. data/samples/merbapp/config/environments/production.rb +1 -0
  39. data/samples/merbapp/config/environments/test.rb +1 -0
  40. data/samples/merbapp/config/merb.yml +82 -0
  41. data/samples/merbapp/config/merb_init.rb +26 -0
  42. data/samples/merbapp/config/mole_config.rb +33 -0
  43. data/samples/merbapp/config/router.rb +38 -0
  44. data/samples/merbapp/config/upload.conf +0 -0
  45. data/samples/merbapp/public/images/merb.jpg +0 -0
  46. data/samples/merbapp/public/merb.fcgi +6 -0
  47. data/samples/merbapp/public/stylesheets/master.css +119 -0
  48. data/samples/merbapp/script/destroy +32 -0
  49. data/samples/merbapp/script/generate +32 -0
  50. data/samples/merbapp/script/stop_merb +13 -0
  51. data/samples/merbapp/spec/spec_helper.rb +15 -0
  52. data/samples/merbapp/test/test_helper.rb +14 -0
  53. data/samples/railsapp/README +14 -0
  54. data/samples/railsapp/Rakefile +10 -0
  55. data/samples/railsapp/app/controllers/application.rb +13 -0
  56. data/samples/railsapp/app/controllers/moled_controller.rb +24 -0
  57. data/samples/railsapp/app/helpers/application_helper.rb +3 -0
  58. data/samples/railsapp/app/views/moled/index.html.erb +5 -0
  59. data/samples/railsapp/app/views/moled/result.html.erb +5 -0
  60. data/samples/railsapp/config/boot.rb +109 -0
  61. data/samples/railsapp/config/database.yml +13 -0
  62. data/samples/railsapp/config/environment.rb +59 -0
  63. data/samples/railsapp/config/environments/development.rb +18 -0
  64. data/samples/railsapp/config/environments/production.rb +20 -0
  65. data/samples/railsapp/config/environments/test.rb +22 -0
  66. data/samples/railsapp/config/initializers/inflections.rb +10 -0
  67. data/samples/railsapp/config/initializers/mime_types.rb +5 -0
  68. data/samples/railsapp/config/initializers/mole.rb +10 -0
  69. data/samples/railsapp/config/moles/mole_config.rb +44 -0
  70. data/samples/railsapp/config/routes.rb +35 -0
  71. data/samples/railsapp/doc/README_FOR_APP +2 -0
  72. data/samples/railsapp/public/.htaccess +40 -0
  73. data/samples/railsapp/public/404.html +30 -0
  74. data/samples/railsapp/public/422.html +30 -0
  75. data/samples/railsapp/public/500.html +30 -0
  76. data/samples/railsapp/public/dispatch.cgi +10 -0
  77. data/samples/railsapp/public/dispatch.fcgi +24 -0
  78. data/samples/railsapp/public/dispatch.rb +10 -0
  79. data/samples/railsapp/public/favicon.ico +0 -0
  80. data/samples/railsapp/public/images/rails.png +0 -0
  81. data/samples/railsapp/public/javascripts/application.js +2 -0
  82. data/samples/railsapp/public/javascripts/controls.js +963 -0
  83. data/samples/railsapp/public/javascripts/dragdrop.js +972 -0
  84. data/samples/railsapp/public/javascripts/effects.js +1120 -0
  85. data/samples/railsapp/public/javascripts/prototype.js +4225 -0
  86. data/samples/railsapp/public/robots.txt +5 -0
  87. data/samples/railsapp/script/about +3 -0
  88. data/samples/railsapp/script/console +3 -0
  89. data/samples/railsapp/script/destroy +3 -0
  90. data/samples/railsapp/script/generate +3 -0
  91. data/samples/railsapp/script/performance/benchmarker +3 -0
  92. data/samples/railsapp/script/performance/profiler +3 -0
  93. data/samples/railsapp/script/performance/request +3 -0
  94. data/samples/railsapp/script/plugin +3 -0
  95. data/samples/railsapp/script/process/inspector +3 -0
  96. data/samples/railsapp/script/process/reaper +3 -0
  97. data/samples/railsapp/script/process/spawner +3 -0
  98. data/samples/railsapp/script/runner +3 -0
  99. data/samples/railsapp/script/server +3 -0
  100. data/samples/railsapp/test/test_helper.rb +38 -0
  101. data/samples/rubyapp/README +22 -0
  102. data/samples/rubyapp/bin/ruby_app +35 -0
  103. data/samples/rubyapp/config/mole_conf.rb +31 -0
  104. data/samples/rubyapp/lib/fred.rb +22 -0
  105. data/spec/config/auto_mole_config.rb +26 -0
  106. data/spec/config/mole_config.rb +0 -0
  107. data/spec/config/moles/fred_config.rb +0 -0
  108. data/spec/data/blee.rb +64 -0
  109. data/spec/db/migrate_spec.rb +19 -0
  110. data/spec/emole_spec.rb +43 -0
  111. data/spec/logger_spec.rb +56 -0
  112. data/spec/models/mole_feature_spec.rb +48 -0
  113. data/spec/models/mole_log_spec.rb +62 -0
  114. data/spec/module_spec.rb +229 -0
  115. data/spec/mole_spec.rb +135 -0
  116. data/spec/moler_spec.rb +77 -0
  117. data/spec/spec_helper.rb +76 -0
  118. data/spec/utils/framework_spec.rb +99 -0
  119. data/tasks/ann.rake +76 -0
  120. data/tasks/annotations.rake +22 -0
  121. data/tasks/doc.rake +48 -0
  122. data/tasks/gem.rake +110 -0
  123. data/tasks/manifest.rake +49 -0
  124. data/tasks/mole.rake +115 -0
  125. data/tasks/post_load.rake +26 -0
  126. data/tasks/rubyforge.rake +57 -0
  127. data/tasks/setup.rb +227 -0
  128. data/tasks/spec.rake +54 -0
  129. data/tasks/svn.rake +44 -0
  130. data/tasks/test.rake +38 -0
  131. data/templates/mole/e_mole/exception_alerts.rhtml +14 -0
  132. data/templates/mole/e_mole/feature_alerts.rhtml +11 -0
  133. data/templates/mole/e_mole/perf_alerts.rhtml +12 -0
  134. metadata +206 -0
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.join(File.dirname(__FILE__), '..')
3
+
4
+ # required to overcome a callback in rspec
5
+ def at_exit
6
+ end
7
+
8
+ begin
9
+ require 'rubigen'
10
+ rescue LoadError
11
+ require 'rubygems'
12
+ require 'rubigen'
13
+ end
14
+
15
+ require File.join(File.dirname(__FILE__), "..", 'config', 'boot')
16
+ require (APP_ROOT / "config" / "merb_init" )
17
+ module Kernel
18
+ undef dependency if defined?(Kernel.dependency)
19
+ end
20
+
21
+ # Make the App's local gems available
22
+ Gem.clear_paths
23
+ Gem.path.unshift(APP_ROOT / "gems")
24
+
25
+ require 'rubigen/scripts/destroy'
26
+
27
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
28
+
29
+ # Default is to use rspec generators in gems. To change this to
30
+ # Test::Unit use [:merb, :test_unit]
31
+ RubiGen::Base.use_component_sources! Merb::GENERATOR_SCOPE
32
+ RubiGen::Scripts::Destroy.new.run(ARGV)
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.join(File.dirname(__FILE__), '..')
3
+
4
+ # required to overcome a callback in rspec
5
+ def at_exit
6
+ end
7
+
8
+ begin
9
+ require 'rubigen'
10
+ rescue LoadError
11
+ require 'rubygems'
12
+ require 'rubigen'
13
+ end
14
+
15
+ require File.join(File.dirname(__FILE__), "..", 'config', 'boot')
16
+ require File.join(Merb.root, 'config', 'dependencies')
17
+ module Kernel
18
+ undef dependency if defined?(Kernel.dependency)
19
+ end
20
+
21
+ # Make the App's local gems available
22
+ Gem.clear_paths
23
+ Gem.path.unshift(APP_ROOT / "gems")
24
+
25
+ require 'rubigen/scripts/generate'
26
+
27
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
28
+
29
+ # Default is to use rspec generators in gems. To change this to
30
+ # Test::Unit use [:merb, :test_unit]
31
+ RubiGen::Base.use_component_sources! Merb::GENERATOR_SCOPE
32
+ RubiGen::Scripts::Generate.new.run(ARGV)
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fileutils'
3
+
4
+ pids=[]
5
+
6
+ port_or_star = ARGV[0] || '*'
7
+
8
+ Dir[File.dirname(__FILE__)+"/../log/merb.#{port_or_star}.pid"].each do |f|
9
+ pid = IO.read(f).chomp.to_i
10
+ puts "killing PID: #{pid}"
11
+ Process.kill(9, pid)
12
+ FileUtils.rm f
13
+ end
@@ -0,0 +1,15 @@
1
+ $TESTING=true
2
+ require File.join(File.dirname(__FILE__), "..", 'config', 'boot')
3
+ Merb.environment="test"
4
+ require File.join(Merb.root, 'config', 'merb_init')
5
+
6
+ require 'merb/test/helper'
7
+ require 'merb/test/rspec'
8
+
9
+ Spec::Runner.configure do |config|
10
+ config.include(Merb::Test::Helper)
11
+ config.include(Merb::Test::RspecMatchers)
12
+ end
13
+
14
+
15
+ ### METHODS BELOW THIS LINE SHOULD BE EXTRACTED TO MERB ITSELF
@@ -0,0 +1,14 @@
1
+ require File.join(File.dirname(__FILE__), "..", 'config', 'boot')
2
+
3
+ $TESTING=true
4
+
5
+ require 'rubygems'
6
+ require 'test/unit'
7
+ require File.join(Merb.root, 'config', 'merb_init')
8
+
9
+ require 'merb/test/helper'
10
+
11
+ class Test::Unit::TestCase
12
+ include Merb::Test::Helper
13
+ # Add more helper methods to be used by all tests here...
14
+ end
@@ -0,0 +1,14 @@
1
+ Sample MOled Rails App
2
+
3
+ NOTE: You must have rails installed
4
+
5
+
6
+ > cd samples/railsapp
7
+
8
+ Now launch rails
9
+
10
+ > script/server
11
+
12
+ View the app by using the following url
13
+
14
+ http://localhost:3000
@@ -0,0 +1,10 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require(File.join(File.dirname(__FILE__), 'config', 'boot'))
5
+
6
+ require 'rake'
7
+ require 'rake/testtask'
8
+ require 'rake/rdoctask'
9
+
10
+ require 'tasks/rails'
@@ -0,0 +1,13 @@
1
+ class ApplicationController < ActionController::Base
2
+ helper :all # include all helpers, all the time
3
+
4
+ # See ActionController::RequestForgeryProtection for details
5
+ # Uncomment the :secret if you're not using the cookie session store
6
+ protect_from_forgery # :secret => '59d52cb64b5c2ba2a4810a865fecf933'
7
+
8
+ # Load the MOle configuration. Don't crap out if the MOle has not
9
+ # been initialized for the given environment. In dev env this
10
+ # file will be reloaded, allowing you to tweak the MOle configuration
11
+ # to your liking.
12
+ Mole.load_mole_configuration
13
+ end
@@ -0,0 +1,24 @@
1
+ # A plain old application controller that has been MOled...
2
+ class MoledController < ApplicationController
3
+ def index
4
+ end
5
+
6
+ # A plain ol' feature
7
+ def my_action
8
+ puts "Session #{session.inspect}"
9
+ session[:user] = "Fernand"
10
+ @state = "Fred"
11
+ render :template => "moled/result"
12
+ end
13
+
14
+ # A slow action
15
+ def my_slow_action
16
+ sleep( 2 )
17
+ render :template => "moled/result"
18
+ end
19
+
20
+ # Hosed action
21
+ def my_hosed_action
22
+ raise "This will hose your app"
23
+ end
24
+ end
@@ -0,0 +1,3 @@
1
+ # Methods added to this helper will be available to all templates in the application.
2
+ module ApplicationHelper
3
+ end
@@ -0,0 +1,5 @@
1
+ <%= link_to "Mole an action", "/moled/my_action/10"%>
2
+ <br/>
3
+ <%= link_to "Mole a slow action", "/moled/my_slow_action"%>
4
+ <br/>
5
+ <%= link_to "Mole a hosed action", "/moled/my_hosed_action"%>
@@ -0,0 +1,5 @@
1
+ <h1>You've been RailsMOled !</h1>
2
+ <br/>
3
+ <h3>Suspicious ? Check your console output...</h3>
4
+ <br>
5
+ <%= link_to "Go Back", "/moled"%>
@@ -0,0 +1,109 @@
1
+ # Don't change this file!
2
+ # Configure your app in config/environment.rb and config/environments/*.rb
3
+
4
+ RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
5
+
6
+ module Rails
7
+ class << self
8
+ def boot!
9
+ unless booted?
10
+ preinitialize
11
+ pick_boot.run
12
+ end
13
+ end
14
+
15
+ def booted?
16
+ defined? Rails::Initializer
17
+ end
18
+
19
+ def pick_boot
20
+ (vendor_rails? ? VendorBoot : GemBoot).new
21
+ end
22
+
23
+ def vendor_rails?
24
+ File.exist?("#{RAILS_ROOT}/vendor/rails")
25
+ end
26
+
27
+ # FIXME : Ruby 1.9
28
+ def preinitialize
29
+ load(preinitializer_path) if File.exists?(preinitializer_path)
30
+ end
31
+
32
+ def preinitializer_path
33
+ "#{RAILS_ROOT}/config/preinitializer.rb"
34
+ end
35
+ end
36
+
37
+ class Boot
38
+ def run
39
+ load_initializer
40
+ Rails::Initializer.run(:set_load_path)
41
+ end
42
+ end
43
+
44
+ class VendorBoot < Boot
45
+ def load_initializer
46
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
47
+ end
48
+ end
49
+
50
+ class GemBoot < Boot
51
+ def load_initializer
52
+ self.class.load_rubygems
53
+ load_rails_gem
54
+ require 'initializer'
55
+ end
56
+
57
+ def load_rails_gem
58
+ if version = self.class.gem_version
59
+ gem 'rails', version
60
+ else
61
+ gem 'rails'
62
+ end
63
+ rescue Gem::LoadError => load_error
64
+ $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
65
+ exit 1
66
+ end
67
+
68
+ class << self
69
+ def rubygems_version
70
+ Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
71
+ end
72
+
73
+ def gem_version
74
+ if defined? RAILS_GEM_VERSION
75
+ RAILS_GEM_VERSION
76
+ elsif ENV.include?('RAILS_GEM_VERSION')
77
+ ENV['RAILS_GEM_VERSION']
78
+ else
79
+ parse_gem_version(read_environment_rb)
80
+ end
81
+ end
82
+
83
+ def load_rubygems
84
+ require 'rubygems'
85
+
86
+ unless rubygems_version >= '0.9.4'
87
+ $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
88
+ exit 1
89
+ end
90
+
91
+ rescue LoadError
92
+ $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
93
+ exit 1
94
+ end
95
+
96
+ def parse_gem_version(text)
97
+ $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
98
+ end
99
+
100
+ private
101
+ def read_environment_rb
102
+ File.read("#{RAILS_ROOT}/config/environment.rb")
103
+ end
104
+ end
105
+ end
106
+ end
107
+
108
+ # All that for this:
109
+ Rails.boot!
@@ -0,0 +1,13 @@
1
+ development:
2
+ adapter: mysql
3
+ database: mole_test
4
+ username: root
5
+ password:
6
+ host: localhost
7
+
8
+ production:
9
+ adapter: mysql
10
+ database: mole_test
11
+ username: root
12
+ password:
13
+ host: localhost
@@ -0,0 +1,59 @@
1
+ # Be sure to restart your server when you modify this file
2
+
3
+ # Uncomment below to force Rails into production mode when
4
+ # you don't control web/app server and can't set it the proper way
5
+ # ENV['RAILS_ENV'] ||= 'production'
6
+
7
+ # Specifies gem version of Rails to use when vendor/rails is not present
8
+ RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
9
+
10
+ # Bootstrap the Rails environment, frameworks, and default configuration
11
+ require File.join(File.dirname(__FILE__), 'boot')
12
+
13
+ Rails::Initializer.run do |config|
14
+ # Settings in config/environments/* take precedence over those specified here.
15
+ # Application configuration should go into files in config/initializers
16
+ # -- all .rb files in that directory are automatically loaded.
17
+ # See Rails::Configuration for more options.
18
+
19
+ # Skip frameworks you're not going to use (only works if using vendor/rails).
20
+ # To use Rails without a database, you must remove the Active Record framework
21
+ # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
22
+
23
+ # Only load the plugins named here, in the order given. By default, all plugins
24
+ # in vendor/plugins are loaded in alphabetical order.
25
+ # :all can be used as a placeholder for all plugins not explicitly named
26
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
27
+
28
+ # Add additional load paths for your own custom dirs
29
+ # config.load_paths += %W( #{RAILS_ROOT}/extras )
30
+
31
+ # Force all environments to use the same logger level
32
+ # (by default production uses :info, the others :debug)
33
+ # config.log_level = :debug
34
+
35
+ # Your secret key for verifying cookie session data integrity.
36
+ # If you change this key, all old sessions will become invalid!
37
+ # Make sure the secret is at least 30 characters and all random,
38
+ # no regular words or you'll be exposed to dictionary attacks.
39
+ config.action_controller.session = {
40
+ :session_key => '_railsapp_session',
41
+ :secret => '94c8d8149e3d0e0c3c437c40312f95310e5408cc39e1acceaf01659f2013a5da4b2961a044a1b08248d1fcaf4d7baa294fdc2aac1bec42e351fe905642cfc62c'
42
+ }
43
+
44
+ # Use the database for sessions instead of the cookie-based default,
45
+ # which shouldn't be used to store highly confidential information
46
+ # (create the session table with 'rake db:sessions:create')
47
+ # config.action_controller.session_store = :active_record_store
48
+
49
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
50
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
51
+ # like if you have constraints or database-specific column types
52
+ # config.active_record.schema_format = :sql
53
+
54
+ # Activate observers that should always be running
55
+ # config.active_record.observers = :cacher, :garbage_collector
56
+
57
+ # Make Active Record use UTC-base instead of local time
58
+ # config.active_record.default_timezone = :utc
59
+ end
@@ -0,0 +1,18 @@
1
+ # Settings specified here will take precedence over those in config/environment.rb
2
+
3
+ # In the development environment your application's code is reloaded on
4
+ # every request. This slows down response time but is perfect for development
5
+ # since you don't have to restart the webserver when you make code changes.
6
+ config.cache_classes = false
7
+
8
+ # Log error messages when you accidentally call methods on nil.
9
+ config.whiny_nils = true
10
+
11
+ # Show full error reports and disable caching
12
+ config.action_controller.consider_all_requests_local = true
13
+ config.action_view.debug_rjs = true
14
+ config.action_controller.perform_caching = false
15
+ config.action_view.cache_template_extensions = false
16
+
17
+ # Don't care if the mailer can't send
18
+ config.action_mailer.raise_delivery_errors = false
@@ -0,0 +1,20 @@
1
+ # Settings specified here will take precedence over those in config/environment.rb
2
+
3
+ # The production environment is meant for finished, "live" apps.
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Use a different logger for distributed setups
8
+ # config.logger = SyslogLogger.new
9
+
10
+ # Full error reports are disabled and caching is turned on
11
+ config.action_controller.consider_all_requests_local = false
12
+ config.action_controller.perform_caching = true
13
+ config.action_view.cache_template_loading = true
14
+
15
+ # Enable serving of images, stylesheets, and javascripts from an asset server
16
+ # config.action_controller.asset_host = "http://assets.example.com"
17
+
18
+ # Disable delivery errors, bad email addresses will be ignored
19
+ # config.action_mailer.raise_delivery_errors = false
20
+
@@ -0,0 +1,22 @@
1
+ # Settings specified here will take precedence over those in config/environment.rb
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+ config.cache_classes = true
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.action_controller.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Disable request forgery protection in test environment
17
+ config.action_controller.allow_forgery_protection = false
18
+
19
+ # Tell ActionMailer not to deliver emails to the real world.
20
+ # The :test delivery method accumulates sent emails in the
21
+ # ActionMailer::Base.deliveries array.
22
+ config.action_mailer.delivery_method = :test