Sha256: 8ddf46c53deffdfa832063180e8eda644618bce517ec4e204fb9d0ef9874111c

Contents?: true

Size: 828 Bytes

Versions: 4

Compression:

Stored size: 828 Bytes

Contents

# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../dummy/config/environment.rb",  __FILE__)
require "rails/test_help"

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# Load fixtures from the engine
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
end

module ActiveRecord
  class Base

    cattr_accessor :after_initialize_method
    def self.after_initialize(method)
      @@after_initialize_method = method 
    end

    def self.new(*args, &blk)
      o = allocate
      o.send :initialize, *args, &blk
      o.send o.class.after_initialize_method
      o
    end

    def save!
      true
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
big_machine-1.1.1 test/test_helper.rb
big_machine-1.1.0 test/test_helper.rb
big_machine-1.0.1 test/test_helper.rb
big_machine-1.0.0 test/test_helper.rb