check to see if rails is already loaded in a couple of places

This commit is contained in:
maxwell 2011-01-19 13:30:12 -08:00
parent 3dcb3d3e2c
commit 465dd9ba96
4 changed files with 16 additions and 3 deletions

View file

@ -66,6 +66,19 @@ ActiveRecord::Schema.define(:version => 20110119060243) do
add_index "contacts", ["user_id", "pending"], :name => "index_contacts_on_user_id_and_pending"
add_index "contacts", ["user_id", "person_id"], :name => "index_contacts_on_user_id_and_person_id", :unique => true
create_table "histories", :force => true do |t|
t.string "message"
t.string "username"
t.integer "item"
t.string "table"
t.integer "month", :limit => 2
t.integer "year", :limit => 8
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "histories", ["item", "table", "month", "year"], :name => "index_histories_on_item_and_table_and_month_and_year"
create_table "invitations", :force => true do |t|
t.text "message"
t.integer "sender_id"

View file

@ -5,7 +5,7 @@
# files.
ENV["RAILS_ENV"] ||= "test"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') unless defined?(Rails)
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
require 'cucumber/rails/rspec'

View file

@ -1,6 +1,6 @@
ENV["RAILS_ENV"] ||= "test"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') unless defined?(Rails)
require 'timeout'
require 'socket'

View file

@ -12,7 +12,7 @@ rescue MissingSourceFile
def initialize(name)
task name do
# if rspec-rails is a configured gem, this will output helpful material and exit ...
require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
require File.expand_path(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails)
# ... otherwise, do this:
raise <<-MSG