test_battery 0.0.1 → 0.0.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/README.md +12 -1
- data/VERSION +1 -1
- data/lib/generators/battery_controller_generator.rb +2 -2
- data/lib/generators/templates/{crud_controller.rb → controller.rb} +0 -0
- data/lib/generators/templates/{crud_controller_test.rb → controller_test.rb} +0 -0
- data/lib/generators/templates/views/index.html.haml +2 -2
- data/test/helper.rb +0 -1
- data/test_battery.gemspec +3 -4
- metadata +5 -6
- data/Gemfile.lock +0 -78
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Install
|
|
7
7
|
-------
|
8
8
|
|
9
9
|
In your Gemfile:
|
10
|
-
|
10
|
+
|
11
11
|
group :development, :test do
|
12
12
|
gem 'test_battery'
|
13
13
|
end
|
@@ -19,4 +19,15 @@ Controller Crud Generator:
|
|
19
19
|
|
20
20
|
rails g battery_controller kittens
|
21
21
|
|
22
|
+
Test Helpers
|
23
|
+
------------
|
24
|
+
|
25
|
+
### assert\_has\_errors_on
|
26
|
+
assert_has_errors_on( @record, [:field_1, :field_2] )
|
27
|
+
assert_has_errors_on( @record, {:field_1 => 'Message1', :field_2 => 'Message 2'} )
|
28
|
+
|
29
|
+
### assert\_exception\_raised
|
30
|
+
assert_exception_raised do ... end
|
31
|
+
assert_exception_raised ActiveRecord::RecordInvalid do ... end
|
32
|
+
assert_exception_raised Plugin::Error, 'error_message' do ... end
|
22
33
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -6,7 +6,7 @@ class BatteryControllerGenerator < Rails::Generators::Base
|
|
6
6
|
argument :controller_name, :type => :string
|
7
7
|
|
8
8
|
def generate_controller
|
9
|
-
template '
|
9
|
+
template 'controller.rb', "app/controllers/#{models}_controller.rb"
|
10
10
|
end
|
11
11
|
|
12
12
|
def generate_views
|
@@ -18,7 +18,7 @@ class BatteryControllerGenerator < Rails::Generators::Base
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def generate_test
|
21
|
-
template '
|
21
|
+
template 'controller_test.rb', "test/functional/#{models}_controller_test.rb"
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
File without changes
|
File without changes
|
@@ -8,6 +8,6 @@
|
|
8
8
|
%tr
|
9
9
|
%td= debug <%=model%>
|
10
10
|
%td
|
11
|
-
= link_to 'Show', <%=
|
12
|
-
= link_to 'Edit', <%=model%>_path(<%=model%>)
|
11
|
+
= link_to 'Show', <%=model%>_path(<%=model%>)
|
12
|
+
= link_to 'Edit', edit_<%=model%>_path(<%=model%>)
|
13
13
|
= link_to 'Delete', <%=model%>_path(<%=model%>), :method => :delete, :confirm => 'Are you sure?'
|
data/test/helper.rb
CHANGED
data/test_battery.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{test_battery}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov"]
|
@@ -19,14 +19,13 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
21
|
"Gemfile",
|
22
|
-
"Gemfile.lock",
|
23
22
|
"LICENSE.txt",
|
24
23
|
"README.md",
|
25
24
|
"Rakefile",
|
26
25
|
"VERSION",
|
27
26
|
"lib/generators/battery_controller_generator.rb",
|
28
|
-
"lib/generators/templates/
|
29
|
-
"lib/generators/templates/
|
27
|
+
"lib/generators/templates/controller.rb",
|
28
|
+
"lib/generators/templates/controller_test.rb",
|
30
29
|
"lib/generators/templates/views/_form.html.haml",
|
31
30
|
"lib/generators/templates/views/edit.html.haml",
|
32
31
|
"lib/generators/templates/views/index.html.haml",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Oleg Khabarov
|
@@ -74,14 +74,13 @@ extra_rdoc_files:
|
|
74
74
|
files:
|
75
75
|
- .document
|
76
76
|
- Gemfile
|
77
|
-
- Gemfile.lock
|
78
77
|
- LICENSE.txt
|
79
78
|
- README.md
|
80
79
|
- Rakefile
|
81
80
|
- VERSION
|
82
81
|
- lib/generators/battery_controller_generator.rb
|
83
|
-
- lib/generators/templates/
|
84
|
-
- lib/generators/templates/
|
82
|
+
- lib/generators/templates/controller.rb
|
83
|
+
- lib/generators/templates/controller_test.rb
|
85
84
|
- lib/generators/templates/views/_form.html.haml
|
86
85
|
- lib/generators/templates/views/edit.html.haml
|
87
86
|
- lib/generators/templates/views/index.html.haml
|
@@ -105,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
104
|
requirements:
|
106
105
|
- - ">="
|
107
106
|
- !ruby/object:Gem::Version
|
108
|
-
hash:
|
107
|
+
hash: 1765426737184322213
|
109
108
|
segments:
|
110
109
|
- 0
|
111
110
|
version: "0"
|
data/Gemfile.lock
DELETED
@@ -1,78 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
abstract (1.0.0)
|
5
|
-
actionmailer (3.0.3)
|
6
|
-
actionpack (= 3.0.3)
|
7
|
-
mail (~> 2.2.9)
|
8
|
-
actionpack (3.0.3)
|
9
|
-
activemodel (= 3.0.3)
|
10
|
-
activesupport (= 3.0.3)
|
11
|
-
builder (~> 2.1.2)
|
12
|
-
erubis (~> 2.6.6)
|
13
|
-
i18n (~> 0.4)
|
14
|
-
rack (~> 1.2.1)
|
15
|
-
rack-mount (~> 0.6.13)
|
16
|
-
rack-test (~> 0.5.6)
|
17
|
-
tzinfo (~> 0.3.23)
|
18
|
-
activemodel (3.0.3)
|
19
|
-
activesupport (= 3.0.3)
|
20
|
-
builder (~> 2.1.2)
|
21
|
-
i18n (~> 0.4)
|
22
|
-
activerecord (3.0.3)
|
23
|
-
activemodel (= 3.0.3)
|
24
|
-
activesupport (= 3.0.3)
|
25
|
-
arel (~> 2.0.2)
|
26
|
-
tzinfo (~> 0.3.23)
|
27
|
-
activeresource (3.0.3)
|
28
|
-
activemodel (= 3.0.3)
|
29
|
-
activesupport (= 3.0.3)
|
30
|
-
activesupport (3.0.3)
|
31
|
-
arel (2.0.6)
|
32
|
-
builder (2.1.2)
|
33
|
-
erubis (2.6.6)
|
34
|
-
abstract (>= 1.0.0)
|
35
|
-
git (1.2.5)
|
36
|
-
i18n (0.5.0)
|
37
|
-
jeweler (1.5.2)
|
38
|
-
bundler (~> 1.0.0)
|
39
|
-
git (>= 1.2.5)
|
40
|
-
rake
|
41
|
-
mail (2.2.14)
|
42
|
-
activesupport (>= 2.3.6)
|
43
|
-
i18n (>= 0.4.0)
|
44
|
-
mime-types (~> 1.16)
|
45
|
-
treetop (~> 1.4.8)
|
46
|
-
mime-types (1.16)
|
47
|
-
polyglot (0.3.1)
|
48
|
-
rack (1.2.1)
|
49
|
-
rack-mount (0.6.13)
|
50
|
-
rack (>= 1.0.0)
|
51
|
-
rack-test (0.5.7)
|
52
|
-
rack (>= 1.0)
|
53
|
-
rails (3.0.3)
|
54
|
-
actionmailer (= 3.0.3)
|
55
|
-
actionpack (= 3.0.3)
|
56
|
-
activerecord (= 3.0.3)
|
57
|
-
activeresource (= 3.0.3)
|
58
|
-
activesupport (= 3.0.3)
|
59
|
-
bundler (~> 1.0)
|
60
|
-
railties (= 3.0.3)
|
61
|
-
railties (3.0.3)
|
62
|
-
actionpack (= 3.0.3)
|
63
|
-
activesupport (= 3.0.3)
|
64
|
-
rake (>= 0.8.7)
|
65
|
-
thor (~> 0.14.4)
|
66
|
-
rake (0.8.7)
|
67
|
-
thor (0.14.6)
|
68
|
-
treetop (1.4.9)
|
69
|
-
polyglot (>= 0.3.1)
|
70
|
-
tzinfo (0.3.23)
|
71
|
-
|
72
|
-
PLATFORMS
|
73
|
-
ruby
|
74
|
-
|
75
|
-
DEPENDENCIES
|
76
|
-
bundler (~> 1.0.0)
|
77
|
-
jeweler (~> 1.5.2)
|
78
|
-
rails (>= 3.0.3)
|