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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require 'common_validation'
module Annotate
module Validations
class Rails32AutoloadingFactoryGirl < Base
def self.schema_annotation
<<-RUBY
# == Schema Information
#
# Table name: tasks
#
# id :integer not null, primary key
# content :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#
RUBY
end
def self.route_annotation
<<-RUBY
# == Route Map (Updated YYYY-MM-DD HH:MM)
#
# tasks GET /tasks(.:format) tasks#index
# POST /tasks(.:format) tasks#create
# new_task GET /tasks/new(.:format) tasks#new
# edit_task GET /tasks/:id/edit(.:format) tasks#edit
# task GET /tasks/:id(.:format) tasks#show
# PUT /tasks/:id(.:format) tasks#update
# DELETE /tasks/:id(.:format) tasks#destroy
#
RUBY
end
def self.verify_files(test_rig)
Annotate::Validations::Common.verify_files(
{
model: true,
test: true,
fixture: false,
factory: true,
routes: true
}, test_rig, schema_annotation, route_annotation, true
)
end
end
end
end