Sha256: 42b3839e5c95282a02c901890eb20f4b817d8f8aaaca29170d78491fc6d66d6f
Contents?: true
Size: 1.88 KB
Versions: 3
Compression:
Stored size: 1.88 KB
Contents
RAILS_ROOT = '.' unless defined? RAILS_ROOT RAILS_ENV = 'test' unless defined? RAILS_ENV module Rails module VERSION STRING = '2.3.4' unless defined? STRING end end # require 'multi_rails_init' require 'rubygems' require 'action_controller' require 'action_view' require 'active_record' require 'spec' require File.dirname(__FILE__) + '/spec_rails_helper' require 'shoulda' require File.dirname(__FILE__) + '/custom_matchers' require 'factory_girl' $:.unshift(File.dirname(__FILE__) + '/../lib') require 'exposure' ActiveRecord::Base.logger = Logger.new(STDOUT) if ENV['DEBUG'] ActionController::Base.logger = Logger.new(STDOUT) if ENV['DEBUG'] ActionController::Base.view_paths=(File.dirname(__FILE__) + '/fixtures') ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:") ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define(:version => 1) do create_table :pirates do |t| t.column :title, :string t.column :booty, :text t.column :created_at, :datetime t.column :updated_at, :datetime end create_table :ships do |t| t.column :name, :string t.column :pirate_id, :integer t.column :created_at, :datetime t.column :updated_at, :datetime end create_table :widgets do |t| t.column :title, :string t.column :body, :text t.column :created_at, :datetime t.column :updated_at, :datetime end create_table :ship_types do |t| t.column :title, :string t.column :body, :text t.column :created_at, :datetime t.column :updated_at, :datetime end end class Pirate < ActiveRecord::Base has_many :ships validates_length_of :title, :within => 2..100 def validate end end class Ship < ActiveRecord::Base belongs_to :pirate def validate end validates_associated :pirate end class ShipType < ActiveRecord::Base end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
exposure-0.1.1 | spec/spec_helper.rb |
exposure-0.1.0 | spec/spec_helper.rb |
exposure-0.0.7 | spec/spec_helper.rb |