rspec_rails_scaffold_templates 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98aa459b675d68e9169c7d3ab6487bc547d0aaa6
4
- data.tar.gz: e8cc609e20e2688474e5c2fe4e48e5f33a22b2f8
3
+ metadata.gz: 47396272b31756dde2ce17fe185115e44ea7d513
4
+ data.tar.gz: d210d8b03a4138e645deda8fbf51944c19ac97ab
5
5
  SHA512:
6
- metadata.gz: abcfc81e634f1c2435a0ef61c5596c569d43ea44e3036a8a5f381cbcac0846d5207c64fd427a62b50a4d8d35d1e15fb4286ebc450d7233f3d522cf61fa2d9f2b
7
- data.tar.gz: 08b5ce1ed5ea2c67634a6e6392df0b5ec3e30daf33b8b33d663514f79b440eb93fee417d409fc4e2cc59671bee6914ec00e819a16c7c9aee49b5c4712f87aeac
6
+ metadata.gz: 1eba5677a23fa5d4d26a805bf2a86584eadc8ef0fa1e25bfd204ae81019e47d25559e174a3e06d0c083020d4c30e5da61c388e83601c27d52f1253b7cd9bf0ea
7
+ data.tar.gz: e2cb08ce1cdfe753c46aca923b5bdc65927ef1b4627c3cad019d23203ff81661dbbb9be4f1b72c8ae9f0ea1da723ced276f0a77c505ec3a0d81d09930e23554b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  <% end -%>
6
6
 
7
7
  <% module_namespacing do -%>
8
- describe <%= controller_class_name %>Controller, :type => :controller do
8
+ describe <%= controller_class_name %>Controller, type: :controller do
9
9
 
10
10
  before :each do
11
11
  allow(controller).to receive(:current_user).and_return(current_user)
@@ -57,7 +57,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
57
57
  <% else -%>
58
58
  <%= file_name %> = <%= class_name %>.create! valid_attributes
59
59
  <% end -%>
60
- get :show, {:id => <%= file_name %>.to_param}, valid_session
60
+ get :show, {id: <%= file_name %>.to_param}, valid_session
61
61
  expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
62
62
  end
63
63
  end
@@ -76,7 +76,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
76
76
  <% else -%>
77
77
  <%= file_name %> = <%= class_name %>.create! valid_attributes
78
78
  <% end -%>
79
- get :edit, {:id => <%= file_name %>.to_param}, valid_session
79
+ get :edit, {id: <%= file_name %>.to_param}, valid_session
80
80
  expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
81
81
  end
82
82
  end
@@ -85,18 +85,18 @@ describe <%= controller_class_name %>Controller, :type => :controller do
85
85
  describe "with valid params" do
86
86
  it "creates a new <%= class_name %>" do
87
87
  expect do
88
- post :create, {:<%= ns_file_name %> => valid_attributes}, valid_session
88
+ post :create, {<%= ns_file_name %>: valid_attributes}, valid_session
89
89
  end.to change(<%= class_name %>, :count).by(1)
90
90
  end
91
91
 
92
92
  it "assigns a newly created <%= ns_file_name %> as @<%= ns_file_name %>" do
93
- post :create, {:<%= ns_file_name %> => valid_attributes}, valid_session
93
+ post :create, {<%= ns_file_name %>: valid_attributes}, valid_session
94
94
  expect(assigns(:<%= ns_file_name %>)).to be_a(<%= class_name %>)
95
95
  expect(assigns(:<%= ns_file_name %>)).to be_persisted
96
96
  end
97
97
 
98
98
  it "redirects to the created <%= ns_file_name %>" do
99
- post :create, {:<%= ns_file_name %> => valid_attributes}, valid_session
99
+ post :create, {<%= ns_file_name %>: valid_attributes}, valid_session
100
100
  expect(response).to redirect_to(<%= class_name %>.last)
101
101
  # expect(response).to redirect_to(<%= index_helper %>_url)
102
102
  end
@@ -105,13 +105,13 @@ describe <%= controller_class_name %>Controller, :type => :controller do
105
105
  describe "with invalid params" do
106
106
  it "assigns a newly created but unsaved <%= ns_file_name %> as @<%= ns_file_name %>" do
107
107
  # allow_any_instance_of(<%= class_name %>).to receive(:save).and_return(false)
108
- post :create, {:<%= ns_file_name %> => invalid_attributes}, valid_session
108
+ post :create, {<%= ns_file_name %>: invalid_attributes}, valid_session
109
109
  expect(assigns(:<%= ns_file_name %>)).to be_a_new(<%= class_name %>)
110
110
  end
111
111
 
112
112
  it "re-renders the 'new' template" do
113
113
  # allow_any_instance_of(<%= class_name %>).to receive(:save).and_return(false)
114
- post :create, {:<%= ns_file_name %> => invalid_attributes}, valid_session
114
+ post :create, {<%= ns_file_name %>: invalid_attributes}, valid_session
115
115
  expect(response).to render_template("new")
116
116
  end
117
117
  end
@@ -129,7 +129,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
129
129
  <% end -%>
130
130
  # expect_any_instance_of(<%= class_name %>)
131
131
  # .to receive(:update).with(new_attributes.inject({}){|_, (k, v)| _[k] = v.to_s; _})
132
- put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => new_attributes}, valid_session
132
+ put :update, {id: <%= file_name %>.to_param, <%= ns_file_name %>: new_attributes}, valid_session
133
133
  <%= file_name %>.reload
134
134
  # skip("Add assertions for updated state")
135
135
  expect(<%= file_name %>.<%= attribute_name %>).to eq 'New value'
@@ -141,7 +141,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
141
141
  <% else -%>
142
142
  <%= file_name %> = <%= class_name %>.create! valid_attributes
143
143
  <% end -%>
144
- put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => valid_attributes}, valid_session
144
+ put :update, {id: <%= file_name %>.to_param, <%= ns_file_name %>: valid_attributes}, valid_session
145
145
  expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
146
146
  end
147
147
 
@@ -151,7 +151,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
151
151
  <% else -%>
152
152
  <%= file_name %> = <%= class_name %>.create! valid_attributes
153
153
  <% end -%>
154
- put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => valid_attributes}, valid_session
154
+ put :update, {id: <%= file_name %>.to_param, <%= ns_file_name %>: valid_attributes}, valid_session
155
155
  expect(response).to redirect_to(<%= file_name %>)
156
156
  end
157
157
  end
@@ -164,7 +164,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
164
164
  <%= file_name %> = <%= class_name %>.create! valid_attributes
165
165
  <% end -%>
166
166
  # allow_any_instance_of(<%= class_name %>).to receive(:update).and_return(false)
167
- put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => invalid_attributes}, valid_session
167
+ put :update, {id: <%= file_name %>.to_param, <%= ns_file_name %>: invalid_attributes}, valid_session
168
168
  expect(assigns(:<%= ns_file_name %>)).to be_a(<%= class_name %>)
169
169
  end
170
170
 
@@ -175,7 +175,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
175
175
  <%= file_name %> = <%= class_name %>.create! valid_attributes
176
176
  <% end -%>
177
177
  # allow_any_instance_of(<%= class_name %>).to receive(:update).and_return(false)
178
- put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => invalid_attributes}, valid_session
178
+ put :update, {id: <%= file_name %>.to_param, <%= ns_file_name %>: invalid_attributes}, valid_session
179
179
  expect(response).to render_template("edit")
180
180
  end
181
181
  end
@@ -189,7 +189,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
189
189
  <%= file_name %> = <%= class_name %>.create! valid_attributes
190
190
  <% end -%>
191
191
  expect do
192
- delete :destroy, {:id => <%= file_name %>.to_param}, valid_session
192
+ delete :destroy, {id: <%= file_name %>.to_param}, valid_session
193
193
  end.to change(<%= class_name %>, :count).by(-1)
194
194
  end
195
195
 
@@ -199,7 +199,7 @@ describe <%= controller_class_name %>Controller, :type => :controller do
199
199
  <% else -%>
200
200
  <%= file_name %> = <%= class_name %>.create! valid_attributes
201
201
  <% end -%>
202
- delete :destroy, {:id => <%= file_name %>.to_param}, valid_session
202
+ delete :destroy, {id: <%= file_name %>.to_param}, valid_session
203
203
  expect(response).to redirect_to(<%= index_helper %>_url)
204
204
  end
205
205
  end # describe "DELETE destroy"
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  <% end -%>
6
6
 
7
7
  <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
8
- describe "<%= ns_table_name %>/edit", :type => :view do
8
+ describe "<%= ns_table_name %>/edit", type: :view do
9
9
  before(:each) do
10
10
  allow(controller).to receive(:can?).and_return(true)
11
11
  <% if Rails.application.config.generators.options[:rails][:fixture_replacement] == :factory_girl -%>
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  <% end -%>
6
6
 
7
7
  <% output_attributes = attributes.reject{|attribute| [:created_at, :deleted_at, :updated_at].index(attribute.name) or attribute.password_digest? } -%>
8
- describe "<%= ns_table_name %>/index", :type => :view do
8
+ describe "<%= ns_table_name %>/index", type: :view do
9
9
  before(:each) do
10
10
  allow(controller).to receive(:can?).and_return(true)
11
11
  <% if options[:fixture_replacement] == :factory_girl -%>
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  <% end -%>
6
6
 
7
7
  <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
8
- describe "<%= ns_table_name %>/new", :type => :view do
8
+ describe "<%= ns_table_name %>/new", type: :view do
9
9
  before(:each) do
10
10
  allow(controller).to receive(:can?).and_return(true)
11
11
  <% if Rails.application.config.generators.options[:rails][:fixture_replacement] == :factory_girl -%>
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  <% end -%>
6
6
 
7
7
  <% output_attributes = attributes.reject{|attribute| [:created_at, :deleted_at, :updated_at].index(attribute.name) or attribute.password_digest? } -%>
8
- describe "<%= ns_table_name %>/show", :type => :view do
8
+ describe "<%= ns_table_name %>/show", type: :view do
9
9
  before(:each) do
10
10
  allow(controller).to receive(:can?).and_return(true)
11
11
  <% if Rails.application.config.generators.options[:rails][:fixture_replacement] == :factory_girl -%>
@@ -2,16 +2,16 @@
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 ruby lib
5
+ # stub: rspec_rails_scaffold_templates 1.0.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "rspec_rails_scaffold_templates"
9
- s.version = "1.0.5"
9
+ s.version = "1.0.6"
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"]
13
13
  s.authors = ["Dmitri Koulikoff"]
14
- s.date = "2015-02-24"
14
+ s.date = "2015-02-25"
15
15
  s.description = "RSpec scaffold generator templates that use FactoryGirl and WiceGrid"
16
16
  s.email = "dima@koulikoff.ru"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_rails_scaffold_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitri Koulikoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-24 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec