Sha256: 9c9318661a81020a80700275d7d2aa54284c318862f58e5708202dc6fcbca07d
Contents?: true
Size: 852 Bytes
Versions: 2
Compression:
Stored size: 852 Bytes
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rubygems' require 'active_record' require 'rspec' require 'sid' require 'spec/fixtures/page' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} #Allow to connect to SQLite ActiveRecord::Base.establish_connection( :adapter => "sqlite3", :database => ":memory:" ) RSpec.configure do |config| end def reset_database %W(pages).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 t.integer :account_id t.integer :sid t.integer :sid_alternative end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sid-0.0.2 | spec/spec_helper.rb |
sid-0.0.1 | spec/spec_helper.rb |