rspec_rails_scaffold_templates 1.0.9 → 1.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf17493993334c02acb2d452598d6e5e236ee699
4
- data.tar.gz: 97ac74060f4ecc9b74bf1bc471ce9084cc8e54b6
3
+ metadata.gz: 5c555b0ce319d3c413a492f888727d1d1ed0b180
4
+ data.tar.gz: a61a5f1df2a96983697f128e3f38850dabd6b74d
5
5
  SHA512:
6
- metadata.gz: 7c2c64c45e25ff350ac586cf2865a330e4121081cef9c0f13f6c6d5b4c583e576fb48d1aa8d15814efd102ca6b68745df881b4696a3307fb5c27fd35cf52a4c9
7
- data.tar.gz: 4b7f7c4561fa3b34aaa8e4d9990c85c7fb5b287474db8100f3713797218fdcece869643d63be566fd488497ed5a8561431a1603abcdbfa20d2078b2c5be69226
6
+ metadata.gz: f1d20fd409da20030e82e15cd7d7d73c704d2be5460b5119371bf9efd897e745e521a4dd83ab7b05a117dbc507b4e1c133a83ce5252ca87aa5c04a7f53b108f2
7
+ data.tar.gz: 2c5dec58c17f99720438d9bf19bea02b5248dfd8ad6e90aa323209b8d47387d3717a04069ab0639d722e9c9c6304a5b797c9218ef2eb28c2c7269a34798aa803
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.9
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
- :<%= attribute.name %> => <%= attribute.default.inspect %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
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
- :<%= attribute.name %> => <%= value_for(attribute) %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
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", :text => <%= value_for(attribute) %>.to_s, :count => <%= size %>
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
- :<%= attribute.name %> => <%= attribute.default.inspect %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
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
- :<%= attribute.name %> => <%= value_for(attribute) %><%= attribute_index == output_attributes.length - 1 ? '' : ','%>
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: Regexp.new(raw_value_for(attribute))
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.9 ruby lib
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"
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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_rails_scaffold_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitri Koulikoff