spec/spec_helper.rb in datts_right-0.0.7 vs spec/spec_helper.rb in datts_right-0.0.8

- old
+ new

@@ -2,11 +2,11 @@ $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rubygems' require 'active_record' require 'rspec' require 'datts_right' -require 'datts_right/page' # for testing +require 'datts_right/page' # Allow to connect to SQLite root = File.expand_path(File.join(File.dirname(__FILE__), '..')) Dir.mkdir("db") unless File.directory?("db") ActiveRecord::Base.establish_connection( @@ -21,16 +21,16 @@ RSpec.configure do |config| end def reset_database - %W(pages datts).each do |table_name| + %W(pages dynamic_attributes).each do |table_name| ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS '#{table_name}'") end ActiveRecord::Base.connection.create_table(:pages) do |t| t.string :name, :default => "My name" end - ActiveRecord::Base.connection.create_table(:datts) do |t| + ActiveRecord::Base.connection.create_table(:dynamic_attributes) do |t| t.string :name, :null => false t.string :attr_key, :null => false t.string :object_type, :null => false t.string :attributable_type, :null => false t.integer :attributable_id, :null => false