rails_config_model_generator 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +3 -0
- data/README.rdoc +1 -1
- data/lib/rails_config_model.rb +1 -1
- data/templates/functional_test.rb +4 -14
- data/templates/unit_test.rb +4 -4
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
== 1.2.2 / 2009-06-06
|
2
|
+
* Generated tests now compatible with Rails 2.3x. If you want to use this on older versions of Rails, use a previous version or manually change the tests
|
3
|
+
|
1
4
|
== 1.2.1 / 2009-04-21
|
2
5
|
|
3
6
|
* Delete protection code uses count instead of find(:all).size. Man that was dumb.
|
data/README.rdoc
CHANGED
@@ -69,7 +69,7 @@ Download and sudo gem install rails_config_model_generator
|
|
69
69
|
|
70
70
|
(The MIT License)
|
71
71
|
|
72
|
-
Copyright (c) 2007 Brian P. Hogan
|
72
|
+
Copyright (c) 2007-2009 Brian P. Hogan
|
73
73
|
|
74
74
|
Permission is hereby granted, free of charge, to any person obtaining
|
75
75
|
a copy of this software and associated documentation files (the
|
data/lib/rails_config_model.rb
CHANGED
@@ -1,18 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require '<%=controller_file_name %>_controller'
|
1
|
+
require test_helper
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
class <%=controller_class_name %>ControllerTest < Test::Unit::TestCase
|
8
|
-
|
9
|
-
fixtures :<%=table_name %>
|
10
|
-
|
11
|
-
def setup
|
12
|
-
@controller = <%=controller_class_name %>Controller.new
|
13
|
-
@request = ActionController::TestRequest.new
|
14
|
-
@response = ActionController::TestResponse.new
|
15
|
-
end
|
3
|
+
class <%=controller_class_name %>ControllerTest < ActionController::TestCase
|
4
|
+
# Uncomment if you need this
|
5
|
+
# fixtures :<%=table_name %>
|
16
6
|
|
17
7
|
def test_index
|
18
8
|
get "index"
|
data/templates/unit_test.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
1
|
+
require test_helper
|
2
2
|
|
3
|
-
class <%=class_name %>Test <
|
4
|
-
|
5
|
-
fixtures :<%=table_name %>
|
3
|
+
class <%=class_name %>Test < ActiveSupport::TestCase
|
4
|
+
# uncomment this if you need it
|
5
|
+
# fixtures :<%=table_name %>
|
6
6
|
|
7
7
|
# The assumption here is that the record was created already.
|
8
8
|
# Once there is a record, it should not allow the creation of an existing one.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_config_model_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Hogan
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-06 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|