rspec_rails_scaffold_templates 1.0.9 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/templates/rspec/scaffold/controller_spec.rb +2 -2
- data/lib/templates/rspec/scaffold/edit_spec.rb +1 -1
- data/lib/templates/rspec/scaffold/index_spec.rb +2 -2
- data/lib/templates/rspec/scaffold/new_spec.rb +1 -1
- data/lib/templates/rspec/scaffold/show_spec.rb +2 -2
- data/rspec_rails_scaffold_templates.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c555b0ce319d3c413a492f888727d1d1ed0b180
|
4
|
+
data.tar.gz: a61a5f1df2a96983697f128e3f38850dabd6b74d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1d20fd409da20030e82e15cd7d7d73c704d2be5460b5119371bf9efd897e745e521a4dd83ab7b05a117dbc507b4e1c133a83ce5252ca87aa5c04a7f53b108f2
|
7
|
+
data.tar.gz: 2c5dec58c17f99720438d9bf19bea02b5248dfd8ad6e90aa323209b8d47387d3717a04069ab0639d722e9c9c6304a5b797c9218ef2eb28c2c7269a34798aa803
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.1.0
|
@@ -23,9 +23,9 @@ describe <%= controller_class_name %>Controller, type: :controller do
|
|
23
23
|
let(:valid_attributes) {FactoryGirl.build(:<%=file_name%>).attributes.slice *%w[<%= attribute_name %>]}
|
24
24
|
<% else -%>
|
25
25
|
<% factory_girl = false -%>
|
26
|
-
let(:valid_attributes)
|
26
|
+
let(:valid_attributes) do
|
27
27
|
skip("Add a hash of attributes valid for your model")
|
28
|
-
|
28
|
+
end
|
29
29
|
<% end -%>
|
30
30
|
|
31
31
|
let(:invalid_attributes) do
|
@@ -15,7 +15,7 @@ describe "<%= ns_table_name %>/edit", type: :view do
|
|
15
15
|
<% else -%>
|
16
16
|
@<%= ns_file_name %> = assign(:<%= ns_file_name %>, <%= class_name %>.create!(<%= '))' if output_attributes.empty? %>
|
17
17
|
<% output_attributes.each_with_index do |attribute, attribute_index| -%>
|
18
|
-
|
18
|
+
<%= attribute.name %>: <%= value_for(attribute) %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
|
19
19
|
<% end -%>
|
20
20
|
<%= output_attributes.empty? ? "" : " ))\n" -%>
|
21
21
|
<% end -%>
|
@@ -31,7 +31,7 @@ describe "<%= ns_table_name %>/index", type: :view do
|
|
31
31
|
<% [1,2].each_with_index do |id, model_index| -%>
|
32
32
|
<%= class_name %>.create(<%= output_attributes.empty? ? (model_index == 1 ? ')' : '),') : '' %>
|
33
33
|
<% output_attributes.each_with_index do |attribute, attribute_index| -%>
|
34
|
-
|
34
|
+
<%= attribute.name %>: <%= value_for(attribute) %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
|
35
35
|
<% end -%>
|
36
36
|
<% if !output_attributes.empty? -%>
|
37
37
|
<%= model_index == 1 ? ')' : '),' %>
|
@@ -73,7 +73,7 @@ describe "<%= ns_table_name %>/index", type: :view do
|
|
73
73
|
assert_select 'tr>td', text: @<%= ns_file_name %>.<%= attribute.name %>.to_s, count: <%= size %>
|
74
74
|
<% end -%>
|
75
75
|
<% else -%>
|
76
|
-
assert_select "tr>td", :
|
76
|
+
assert_select "tr>td", text: <%= value_for(attribute) %>.to_s, :count => <%= size %>
|
77
77
|
<% end -%>
|
78
78
|
<% end -%>
|
79
79
|
end
|
@@ -16,7 +16,7 @@ describe "<%= ns_table_name %>/new", type: :view do
|
|
16
16
|
<% else -%>
|
17
17
|
assign(:<%= ns_file_name %>, <%= class_name %>.new(<%= '))' if output_attributes.empty? %>
|
18
18
|
<% output_attributes.each_with_index do |attribute, attribute_index| -%>
|
19
|
-
|
19
|
+
<%= attribute.name %>: <%= value_for(attribute) %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
|
20
20
|
<% end -%>
|
21
21
|
<%= !output_attributes.empty? ? " ))\n end" : " end" %>
|
22
22
|
<% end -%>
|
@@ -15,7 +15,7 @@ describe "<%= ns_table_name %>/show", type: :view do
|
|
15
15
|
<% else -%>
|
16
16
|
@<%= ns_file_name %> = assign(:<%= ns_file_name %>, <%= class_name %>.create!(<%= '))' if output_attributes.empty? %>
|
17
17
|
<% output_attributes.each_with_index do |attribute, attribute_index| -%>
|
18
|
-
|
18
|
+
<%= attribute.name %>: <%= value_for(attribute) %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
|
19
19
|
<% end -%>
|
20
20
|
<% if !output_attributes.empty? -%>
|
21
21
|
))
|
@@ -33,7 +33,7 @@ describe "<%= ns_table_name %>/show", type: :view do
|
|
33
33
|
assert_select 'dl>dd', text: Regexp.new(@<%= ns_file_name %>.<%= attribute.name %>.to_s)
|
34
34
|
<% end -%>
|
35
35
|
<% else -%>
|
36
|
-
assert_select 'dl>dd', text:
|
36
|
+
assert_select 'dl>dd', text: <%= value_for(attribute) %>
|
37
37
|
<% end -%>
|
38
38
|
<% end -%>
|
39
39
|
end
|
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: rspec_rails_scaffold_templates 1.0
|
5
|
+
# stub: rspec_rails_scaffold_templates 1.1.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "rspec_rails_scaffold_templates"
|
9
|
-
s.version = "1.0
|
9
|
+
s.version = "1.1.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|