spec/spec_helper.rb in memento-0.3.0 vs spec/spec_helper.rb in memento-0.3.1

- old
+ new

@@ -1,24 +1,20 @@ require 'rubygems' require 'active_support' require 'active_record' require 'action_controller' -require 'spec' +require 'rspec' # Initialize time_zones from rails Time.zone_default = Time.__send__(:get_zone, 'Berlin') || raise("Err") ActiveRecord::Base.time_zone_aware_attributes = true ActiveRecord::Base.default_timezone = :utc $:.unshift(File.dirname(__FILE__)) $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'memento' -Spec::Runner.configure do |config| - -end - ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:") # catch AR schema statements $stdout = StringIO.new def setup_db @@ -52,11 +48,11 @@ t.timestamps end create_table :memento_states do |t| t.string :action_type - t.binary :record_data, :limit => 1.megabytes + t.binary :record_data, :limit => 16777215 t.references :record, :polymorphic => true t.references :session t.timestamps end @@ -72,20 +68,20 @@ ActiveRecord::Base.connection.drop_table(table) end end class User < ActiveRecord::Base -end +end unless defined?(User) class Customer < ActiveRecord::Base has_many :projects -end +end unless defined?(Customer) class Project < ActiveRecord::Base belongs_to :customer memento_changes :ignore => :ignore_this -end +end unless defined?(Project) class TimestamplessObject < ActiveRecord::Base memento_changes -end +end unless defined?(TimestamplessObject) \ No newline at end of file