Sha256: 82da09cec9024b49209e5204f789e20788c7226e98574f1f81637cd9bbf02209

Contents?: true

Size: 1.44 KB

Versions: 2

Compression:

Stored size: 1.44 KB

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

=begin

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

require File.expand_path("../../test/dummy/config/environment.rb",  __FILE__)
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __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.respond_to?(:fixture_path=)
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
end


=end

class ActiveSupport::TestCase
  
  def create_user(options = {})
    return User.create({:email => "Dolores"}.merge(options))
  end

  def create_message(options = {})
    return Message.create({:sender => @george,
                           :recipient => @jerry,
                           :subject => "Frolf, Jerry!",
                           :body => "Frolf, Jerry! Frisbee golf!"}.merge(options))
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_private_messages-0.0.2 test/test_helper.rb
rails_private_messages-0.0.1 test/test_helper.rb