junctions 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +50 -0
  3. data/Gemfile +14 -0
  4. data/Gemfile.lock +45 -0
  5. data/LICENSE +21 -0
  6. data/README.md +49 -0
  7. data/junctions.gemspec +29 -0
  8. data/lib/junctions/engine.rb +30 -110
  9. data/lib/junctions/version.rb +4 -2
  10. data/lib/junctions.rb +11 -0
  11. data/test/junctions_test.rb +25 -3
  12. data/test/lib/common/wibble_extensions.rb +14 -0
  13. data/test/lib/metal/wibble_extensions.rb +11 -0
  14. data/test/lib/plastic/wibble_extensions.rb +7 -0
  15. data/test/lib/wibble.rb +8 -0
  16. data/test/lib/wobble.rb +8 -0
  17. data/test/test_helper.rb +1 -17
  18. metadata +78 -127
  19. data/lib/junctions/brand_methods.rb +0 -35
  20. data/test/dummy/README.rdoc +0 -28
  21. data/test/dummy/Rakefile +0 -6
  22. data/test/dummy/app/assets/javascripts/application.js +0 -13
  23. data/test/dummy/app/assets/javascripts/easy_checks.js +0 -2
  24. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  25. data/test/dummy/app/assets/stylesheets/easy_checks.css +0 -4
  26. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -56
  27. data/test/dummy/app/controllers/application_controller.rb +0 -5
  28. data/test/dummy/app/controllers/easy_checks_controller.rb +0 -58
  29. data/test/dummy/app/helpers/application_helper.rb +0 -2
  30. data/test/dummy/app/helpers/easy_checks_helper.rb +0 -2
  31. data/test/dummy/app/models/easy_check.rb +0 -2
  32. data/test/dummy/app/views/easy_checks/_form.html.erb +0 -17
  33. data/test/dummy/app/views/easy_checks/edit.html.erb +0 -6
  34. data/test/dummy/app/views/easy_checks/index.html.erb +0 -25
  35. data/test/dummy/app/views/easy_checks/new.html.erb +0 -5
  36. data/test/dummy/app/views/easy_checks/show.html.erb +0 -4
  37. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  38. data/test/dummy/bin/bundle +0 -3
  39. data/test/dummy/bin/rails +0 -4
  40. data/test/dummy/bin/rake +0 -4
  41. data/test/dummy/bin/setup +0 -29
  42. data/test/dummy/config/application.rb +0 -26
  43. data/test/dummy/config/boot.rb +0 -5
  44. data/test/dummy/config/brands/databases/core/database.yml +0 -50
  45. data/test/dummy/config/brands/databases/dumdeedee/database.yml +0 -50
  46. data/test/dummy/config/brands/environments/core/development.rb +0 -13
  47. data/test/dummy/config/brands/environments/core/production.rb +0 -77
  48. data/test/dummy/config/brands/environments/core/test.rb +0 -42
  49. data/test/dummy/config/brands/environments/dumdeedee/development.rb +0 -4
  50. data/test/dummy/config/brands/environments/dumdeedee/production.rb +0 -77
  51. data/test/dummy/config/brands/environments/dumdeedee/test.rb +0 -42
  52. data/test/dummy/config/database.yml +0 -50
  53. data/test/dummy/config/environment.rb +0 -5
  54. data/test/dummy/config/environments/development.rb +0 -41
  55. data/test/dummy/config/environments/production.rb +0 -77
  56. data/test/dummy/config/environments/test.rb +0 -42
  57. data/test/dummy/config/initializers/assets.rb +0 -11
  58. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  59. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  60. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  61. data/test/dummy/config/initializers/inflections.rb +0 -16
  62. data/test/dummy/config/initializers/mime_types.rb +0 -4
  63. data/test/dummy/config/initializers/session_store.rb +0 -3
  64. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  65. data/test/dummy/config/locales/en.yml +0 -23
  66. data/test/dummy/config/routes.rb +0 -7
  67. data/test/dummy/config/secrets.yml +0 -22
  68. data/test/dummy/config.ru +0 -4
  69. data/test/dummy/db/migrate/20141118121139_create_easy_checks.rb +0 -8
  70. data/test/dummy/db/schema.rb +0 -36
  71. data/test/dummy/lib/brands/app/views/dumdeedee/easy_checks/index.html.erb +0 -25
  72. data/test/dummy/public/404.html +0 -67
  73. data/test/dummy/public/422.html +0 -67
  74. data/test/dummy/public/500.html +0 -66
  75. data/test/dummy/test/controllers/easy_checks_controller_test.rb +0 -49
  76. data/test/dummy/test/fixtures/easy_checks.yml +0 -11
  77. data/test/dummy/test/models/easy_check_test.rb +0 -7
  78. data/test/integration/navigation_test.rb +0 -10
  79. data/test/lib/generators/junctions/model_generator_test.rb +0 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c9ff0e5eba4046ba01c51716d02ef558f6d76d614569d3d07c0a7d2386187c1
4
- data.tar.gz: a72f7cd80a90bd1f4df1813b3b4b25a0ed6f36cfe9b67b115db0bd1b0143eee7
3
+ metadata.gz: 46968c8faf2deace067f63346169d31d0edeb70364bee6307aa3e16e1a58d654
4
+ data.tar.gz: e115486975b7d8642ea174899a85164cbba670420b8521ded913f29ddfebab10
5
5
  SHA512:
6
- metadata.gz: 4b196f9d119271254f7e6f414ea9967a738b4b4e68dad08527964fef5cfced61dc30a7120489d358d576055d0201f6f46cefda54ff4e6f8840bc6b727fa09c77
7
- data.tar.gz: 75209ec68e5f176183ba356ab6e34bffae6f86e36005498736336485f2a3a5276e16b007799248b608e5195868ec3a3dbf6d95eaa7776fbe380a50fe33a95331
6
+ metadata.gz: 772a897be5bc58ff2f5a48b725c4d4baf5a62e241ff5cf810569b28d4abe5d1fbf77df2879a94c0431d06ae3cff369fa5642f14ca20f1b56087ce7fc584e04b3
7
+ data.tar.gz: e6d4a97ce751b35da00e77bd1cf9296f10900e273118b3494c0fc8e0eea8987fc29d935eb1b9c9fdc7b57735888d03cd60629abadd451eed8c825db6b42ef7c4
data/.gitignore ADDED
@@ -0,0 +1,50 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Declare your gem's dependencies in junctions.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # Declare any dependencies that are still in development here instead of in
9
+ # your gemspec. These might include edge Rails or gems from your path or
10
+ # Git. Remember to move these dependencies to your gemspec before releasing
11
+ # your gem to rubygems.org.
12
+
13
+ # To use a debugger
14
+ # gem 'byebug', group: [:development, :test]
data/Gemfile.lock ADDED
@@ -0,0 +1,45 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ junctions (0.0.2)
5
+ activesupport
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (5.2.0)
11
+ concurrent-ruby (~> 1.0, >= 1.0.2)
12
+ i18n (>= 0.7, < 2)
13
+ minitest (~> 5.1)
14
+ tzinfo (~> 1.1)
15
+ concurrent-ruby (1.0.5)
16
+ config_files (0.1.3)
17
+ activesupport
18
+ docile (1.3.0)
19
+ i18n (1.0.1)
20
+ concurrent-ruby (~> 1.0)
21
+ json (2.1.0)
22
+ minitest (5.11.3)
23
+ rake (12.3.1)
24
+ simplecov (0.16.1)
25
+ docile (~> 1.1)
26
+ json (>= 1.8, < 3)
27
+ simplecov-html (~> 0.10.0)
28
+ simplecov-html (0.10.2)
29
+ thread_safe (0.3.6)
30
+ tzinfo (1.2.5)
31
+ thread_safe (~> 0.1)
32
+
33
+ PLATFORMS
34
+ ruby
35
+
36
+ DEPENDENCIES
37
+ bundler
38
+ config_files
39
+ junctions!
40
+ minitest
41
+ rake
42
+ simplecov
43
+
44
+ BUNDLED WITH
45
+ 1.16.1
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2010 Paul McKibbin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # Junctions
2
+ Layered junctioning for Rails. Feature flags done right.
3
+
4
+ Junctions works by enabling conditional namespaced module inclusion. What that actually means is that features
5
+ in a module can be enabled or disable by creating them in a particular namespace. For example:
6
+
7
+ ```ruby
8
+ module Core
9
+ include Junctions
10
+ def overridden_method
11
+ puts('You are in core')
12
+ end
13
+ end
14
+
15
+ module Wibble
16
+ def overridden_method
17
+ puts('Wibble')
18
+ end
19
+ end
20
+
21
+ module Wobble
22
+ def overridden_method
23
+ puts('Something else')
24
+ end
25
+ end
26
+ ```
27
+ Including Junctions in Core means that if there is a 'junctions' setting as, for example, an environment variable
28
+ ```bash
29
+ junctions=wibble, wobble
30
+ ```
31
+ would first load up Core, then Wibble and finally Wobble as modules and include each of them in turn. This has the effect of
32
+ overriding the 'overridden_method' inside Core to display 'Something else' as the message.
33
+ Likewise if the environment variable were:
34
+ ```bash
35
+ junctions=wibble
36
+ ```
37
+ This would only include Wibble into the list of namespaces to override Core methods.
38
+
39
+ Ruby and Rails Versions
40
+
41
+ Junctions has been built for Ruby 2.5 and Rails 5. Although it was originally built for Ruby 1.8 and Rails 2,
42
+ because of fundamental changes to later versions of rails and engines in particular, the decision was made to
43
+ track the latest Rails version only.
44
+
45
+
46
+
47
+
48
+
49
+
data/junctions.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require 'junctions'
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = 'junctions'
9
+ s.version = Rails::Junctions::VERSION
10
+ s.authors = ['Paul McKibbin']
11
+ s.email = ['pmckibbin@gmail.com']
12
+ s.homepage = 'http://blackrat.org'
13
+ s.summary = 'Summary of Junctions.'
14
+ s.description = 'Description of Junctions.'
15
+ s.license = 'MIT'
16
+
17
+ s.files = `git ls-files`.split($/)
18
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
20
+ s.require_paths = ['lib']
21
+
22
+ s.add_dependency 'activesupport', '~> 0'
23
+
24
+ s.add_development_dependency 'bundler', '~> 0'
25
+ s.add_development_dependency 'rake', '~> 0'
26
+ s.add_development_dependency 'minitest', '~> 0'
27
+ s.add_development_dependency 'simplecov', '~> 0'
28
+ s.add_development_dependency 'config_files', '~> 0'
29
+ end
@@ -1,126 +1,46 @@
1
+ require 'active_support/inflector'
1
2
  module Junctions
2
- class Engine < ::Rails::Engine
3
- isolate_namespace Junctions
4
-
5
- @brand_list=nil
3
+ class Engine
6
4
  class << self
7
- attr_accessor :brand_list
8
-
9
- def get_initializer_roots(*args)
10
- args.map do |arg|
11
- root=ENV[arg]
12
- root && root.split(',') or nil
13
- end.flatten.compact << 'core'
14
- end
15
-
16
- def brand_list
17
- @brand_list||=get_initializer_roots('brand')
18
- end
19
- end
20
-
21
-
22
- private
23
- def all_features(&blk)
24
- [:cells,:controllers,:decorators,:helpers,:mailers,:models,:notifications,:observers,:policies,:reports].each do |feature|
25
- yield feature
26
- end
27
- end
28
-
29
- def base_config(config)
30
- config.paths.add 'lib/brands', eager_load: true, glob: '*'
31
- config.paths.add 'lib/brands/lib', eager_load: true, glob: '*'
32
- all_features do |feature|
33
- config.paths.add "lib/brands/app/#{feature}", eager_load: true, glob: '*'
34
- config.paths.add "app/#{feature}", eager_load: true, glob: '*'
35
- end
36
- end
37
-
38
- def brand_config(config, brand)
39
- config.paths.add "lib/brands/#{brand}", eager_load: true, glob: '*'
40
- config.paths.add "lib/brands/lib/#{brand}", eager_load: true, glob: '*'
41
- all_features do |feature|
42
- config.paths.add "lib/brands/app/#{feature}/#{brand}"
43
- config.paths.add "app/#{feature}/#{brand}"
44
- end
45
- end
5
+ public
6
+ attr_writer :junction_list, :core
46
7
 
47
- def view_config(brand)
48
- [
49
- Pathname.new("app/views/#{brand}").expand_path,
50
- Pathname.new("lib/brands/app/views/#{brand}").expand_path
51
- ]
52
- end
53
-
54
- def for_all_brands_reversed(&blk)
55
- brand_list.reverse.each do |brand|
56
- yield brand
8
+ def junction_list
9
+ @junction_list||=get_initializer_roots('junctions')
57
10
  end
58
- end
59
11
 
60
- def for_all_brands(&blk)
61
- brand_list.each do |brand|
62
- yield brand
12
+ def core
13
+ @core||='core'
63
14
  end
64
- end
65
-
66
- def already_in_root?(app)
67
- root.to_s.match app.root.to_s
68
- end
69
-
70
- public
71
- def brand_list
72
- self.class.brand_list
73
- end
74
-
75
15
 
76
- initializer :load_environment_config, before: :load_environment_hook, group: :all do |app|
77
- for_all_brands_reversed do |brand|
78
- app.config.paths['config/environments'] << "config/brands/environments/#{brand}"
79
- app.config.paths['config/initializers'] << "config/brands/initializers/#{brand}"
80
- #TODO This isn't being loaded for the rake db:create, although the rake db:migrate is using it
81
- #TODO Find out and fix the config/database, config/routes.rb not loading the latest instance
82
- #TODO unless you overwrite it.
83
- app.config.paths['config/database'] = "config/brands/databases/#{brand}/database.yml"
84
- app.config.paths['config.routes.rb'] = "config/brands/routes/#{brand}/routes.rb"
16
+ private
17
+ def get_initializer_roots(*args)
18
+ args.map do |arg|
19
+ root=ENV[arg]
20
+ root && root.split(',') or nil
21
+ end.flatten.compact << core
85
22
  end
86
- # app.config.paths['config/database'],old_db='',app.config.paths['config/database']
87
- # app.config.paths['config/routes.rb'],old_routes='',app.config.paths['config/routes']
88
- # for_all_brands do |brand|
89
- # app.config.paths['config/database'] = "config/brands/databases/#{brand}/database.yml"
90
- # app.config.paths['config.routes.rb'] = "config/brands/routes/#{brand}/routes.rb"
91
- # end
92
- # app.config.paths['config/database'] << old_db
93
- # app.config.paths['config/routes.rb'] << old_routes
94
- end
95
23
 
96
- initializer :append_migrations do |app|
97
- unless already_in_root?(app)
98
- config.paths['db/migrate'].expanded.each do |expanded_path|
99
- app.config.paths['db/migrate'] << expanded_path
100
- end
24
+ def junction_classes
25
+ junction_list.reverse
101
26
  end
102
- end
103
27
 
104
- initializer :add_eager_load_lib do |app|
105
- for_all_brands_reversed do |brand|
106
- brand_config(app.config,brand)
28
+ def switch_to_junction(junction_class, base, base_name)
29
+ name=base_name.gsub("#{core.classify}::", "#{junction_class}::")
30
+ begin
31
+ require(name.underscore)
32
+ base.instance_eval {
33
+ include name.constantize
34
+ } if name.gsub(/::[^:]*$/, '').constantize.const_defined?(name.demodulize)
35
+ rescue Exception => e
36
+ puts(e.message)
37
+ puts(e.backtrace)
38
+ end unless base_name==name
107
39
  end
108
- base_config(app.config)
109
- app.config.paths.add 'lib/brands/app', eager_load: true, glob: '*'
110
- end
111
40
 
112
- initializer :add_brand_view_paths do |app|
113
- unless already_in_root?(app)
114
- for_all_brands_reversed do |brand|
115
- view_config(brand).each do |brand_view|
116
- ActiveSupport.on_load(:action_controller){
117
- prepend_view_path(brand_view) if respond_to?(:prepend_view_path)
118
- }
119
- ActiveSupport.on_load(:action_mailer){
120
- prepend_view_path(brand_view)
121
- }
122
- end
123
- end
41
+ public
42
+ def activate(base, name)
43
+ junction_classes.each { |junction_class| switch_to_junction(junction_class.classify, base, name) }
124
44
  end
125
45
  end
126
46
  end
@@ -1,3 +1,5 @@
1
- module Junctions
2
- VERSION = "0.0.1"
1
+ module Rails
2
+ module Junctions
3
+ VERSION = '0.0.3'
4
+ end
3
5
  end
data/lib/junctions.rb CHANGED
@@ -1 +1,12 @@
1
+ require 'junctions/engine'
1
2
  require "junctions/version"
3
+
4
+ module Junctions
5
+ class << self
6
+ delegate :core=, :junction_list=, :activate, to: Junctions::Engine
7
+
8
+ def included(base)
9
+ Junctions::Engine.activate(base, self.name)
10
+ end
11
+ end
12
+ end
@@ -1,7 +1,29 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../lib'))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
1
3
  require 'test_helper'
4
+ require 'wibble'
5
+ require 'wobble'
2
6
 
3
- class JunctionsTest < ActiveSupport::TestCase
4
- test "truth" do
5
- assert_kind_of Module, Junctions
7
+ class Junctions::Test < MiniTest::Spec
8
+ describe Junctions do
9
+ it 'is a module' do
10
+ assert_kind_of Module, Junctions
11
+ end
12
+ end
13
+
14
+ describe ::Wibble do
15
+ it 'has to_s overridden' do
16
+ assert_equal Wibble.new.to_s, 'metal'
17
+ end
18
+
19
+ it 'has a metal method' do
20
+ assert_equal 'metal included too', Wibble.new.metal
21
+ end
22
+ end
23
+
24
+ describe ::Wobble do
25
+ it 'overrides the to_s from metal with its own method' do
26
+ assert_equal 'plastic included too', Wobble.new.metal
27
+ end
6
28
  end
7
29
  end
@@ -0,0 +1,14 @@
1
+ module Common
2
+ module WibbleExtensions
3
+ include Junctions
4
+ class << self
5
+ def included(base)
6
+ Junctions::activate(base, self.name)
7
+ end
8
+ end
9
+
10
+ def to_s
11
+ 'wibble_extensions'
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ module Metal
2
+ module WibbleExtensions
3
+ def to_s
4
+ 'metal'
5
+ end
6
+
7
+ def metal
8
+ "#{to_s} included too"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ module Plastic
2
+ module WibbleExtensions
3
+ def to_s
4
+ 'plastic'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ require 'junctions'
2
+ Junctions::Engine.core = 'common'
3
+ Junctions::Engine.junction_list = ['metal']
4
+ require 'common/wibble_extensions'
5
+
6
+ class Wibble
7
+ include Common::WibbleExtensions
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'junctions'
2
+ Junctions.core = 'common'
3
+ Junctions.junction_list = ['plastic', 'metal']
4
+ require 'common/wibble_extensions'
5
+
6
+ class Wobble
7
+ include Common::WibbleExtensions
8
+ end
data/test/test_helper.rb CHANGED
@@ -1,17 +1 @@
1
- # Configure Rails Environment
2
- ENV["RAILS_ENV"] = "test"
3
-
4
- require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
- ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
6
- ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
7
- require "rails/test_help"
8
-
9
- Rails.backtrace_cleaner.remove_silencers!
10
-
11
- # Load support files
12
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
13
-
14
- # Load fixtures from the engine
15
- if ActiveSupport::TestCase.respond_to?(:fixture_path=)
16
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
17
- end
1
+ require 'minitest/autorun'