mconnell-object_daddy 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.markdown +314 -0
- data/Rakefile +10 -0
- data/init.rb +12 -0
- data/install.rb +28 -0
- data/lib/object_daddy.rb +227 -0
- data/rails/init.rb +1 -0
- data/spec/install_spec.rb +123 -0
- data/spec/object_daddy_spec.rb +848 -0
- data/spec/resources/config/database.yml +3 -0
- data/spec/resources/schema +30 -0
- data/spec/spec.opts +5 -0
- data/spec/spec_helper.rb +20 -0
- metadata +68 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
ActiveRecord::Schema.define(:version => 0) do
|
2
|
+
create_table :frobnitzs, :force => true do |t|
|
3
|
+
t.column :name, :string
|
4
|
+
t.column :title, :string
|
5
|
+
t.column :foo_id, :integer
|
6
|
+
t.column :thing_id, :integer
|
7
|
+
t.column :bangbang_id, :integer
|
8
|
+
t.column :blitblot_id, :integer
|
9
|
+
end
|
10
|
+
|
11
|
+
create_table :foos, :force => true do |t|
|
12
|
+
t.column :name, :string
|
13
|
+
end
|
14
|
+
|
15
|
+
create_table :bars, :force => true do |t|
|
16
|
+
t.column :name, :string
|
17
|
+
end
|
18
|
+
|
19
|
+
create_table :things, :force => true do |t|
|
20
|
+
t.column :name, :string
|
21
|
+
end
|
22
|
+
|
23
|
+
create_table :blahs, :force => true do |t|
|
24
|
+
t.column :bam, :string
|
25
|
+
end
|
26
|
+
|
27
|
+
create_table :ya_models, :force => true do |t|
|
28
|
+
t.column :name, :string
|
29
|
+
end
|
30
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
$:.unshift(File.dirname(__FILE__) + '/../lib/')
|
2
|
+
|
3
|
+
Spec::Runner.configure do |config|
|
4
|
+
config.mock_with :mocha
|
5
|
+
end
|
6
|
+
|
7
|
+
def setup_rails_database
|
8
|
+
dir = File.dirname(__FILE__)
|
9
|
+
|
10
|
+
ENV["RAILS_ENV"] ||= "test"
|
11
|
+
require "#{dir}/../../../../config/environment"
|
12
|
+
|
13
|
+
db = YAML::load(IO.read("#{dir}/resources/config/database.yml"))
|
14
|
+
ActiveRecord::Base.configurations = {'test' => db[ENV['DB'] || 'sqlite3']}
|
15
|
+
ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test'])
|
16
|
+
ActiveRecord::Migration.verbose = false
|
17
|
+
load "#{dir}/resources/schema"
|
18
|
+
|
19
|
+
require "#{dir}/../init.rb"
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mconnell-object_daddy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rick Bradley
|
8
|
+
- Yossef Mendelssohn
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2009-05-06 00:00:00 -07:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: Who's your daddy? Kill Rails fixtures, Don't Repeat Yourself, reduce the complexity of your tests.
|
18
|
+
email:
|
19
|
+
- blogicx@rickbradley.com
|
20
|
+
- ymendel@pobox.com
|
21
|
+
executables: []
|
22
|
+
|
23
|
+
extensions: []
|
24
|
+
|
25
|
+
extra_rdoc_files: []
|
26
|
+
|
27
|
+
files:
|
28
|
+
- init.rb
|
29
|
+
- rails/init.rb
|
30
|
+
- install.rb
|
31
|
+
- MIT-LICENSE
|
32
|
+
- README.markdown
|
33
|
+
- Rakefile
|
34
|
+
- lib/object_daddy.rb
|
35
|
+
- spec/install_spec.rb
|
36
|
+
- spec/object_daddy_spec.rb
|
37
|
+
- spec/resources/config/database.yml
|
38
|
+
- spec/resources/schema
|
39
|
+
- spec/spec.opts
|
40
|
+
- spec/spec_helper.rb
|
41
|
+
has_rdoc: false
|
42
|
+
homepage: http://github.com/flogic/object_daddy
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
|
46
|
+
require_paths:
|
47
|
+
- lib
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: "0"
|
53
|
+
version:
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: "0"
|
59
|
+
version:
|
60
|
+
requirements: []
|
61
|
+
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 1.2.0
|
64
|
+
signing_key:
|
65
|
+
specification_version: 2
|
66
|
+
summary: Who's your daddy? Kill Rails fixtures, Don't Repeat Yourself, reduce the complexity of your tests.
|
67
|
+
test_files: []
|
68
|
+
|