File: spec_helper.rb

package info (click to toggle)
ruby-validate-url 1.0.2%2Bgit-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 172 kB
  • sloc: ruby: 302; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/resources')
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rspec'
require 'sqlite3'
require 'active_record'
require 'active_record/base'
require 'active_record/migration'

ActiveRecord::Migration.verbose = false
ActiveRecord::Base.establish_connection(
    "adapter"   => "sqlite3",
    "database"  => ":memory:"
)

require File.join(File.dirname(__FILE__), '..', 'init')

autoload :User,                  'resources/user'
autoload :UserWithNil,           'resources/user_with_nil'
autoload :UserWithBlank,         'resources/user_with_blank'
autoload :UserWithLegacySyntax,  'resources/user_with_legacy_syntax'
autoload :UserWithAr,            'resources/user_with_ar'
autoload :UserWithArLegacy,      'resources/user_with_ar_legacy'
autoload :UserWithCustomScheme,  'resources/user_with_custom_scheme'
autoload :UserWithCustomMessage, 'resources/user_with_custom_message'
autoload :UserWithNoLocal,       'resources/user_with_no_local'