rspec_rails_scaffold_templates 1.0.2 → 1.0.3
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 +4 -4
- data/VERSION +1 -1
- data/lib/templates/rspec/scaffold/controller_spec.rb +8 -7
- data/rspec_rails_scaffold_templates.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0a77090918aefdb5a74f175f20937cb5173cb2c
|
4
|
+
data.tar.gz: 9e2be0cd76f5fe303ac480feb5c6f0cc3de48e10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86679486c9605a71ff23896b7e87782952aeee63e8c8c078595f8db2de298d628f25114dbecffcc21c46c0d9250bc13866ec68807a478e635ae4370ac1a3511a
|
7
|
+
data.tar.gz: f23ccb3e93efda58305849c7d91ad40a17a8dc9768be443411b676bf38730219fb2dfc0ef63a05a183edec595020a5a48d840b1e3757f638e1ca1aed027fc9ba
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
@@ -26,9 +26,9 @@ describe <%= controller_class_name %>Controller, :type => :controller do
|
|
26
26
|
}
|
27
27
|
<% end -%>
|
28
28
|
|
29
|
-
let(:invalid_attributes)
|
29
|
+
let(:invalid_attributes) do
|
30
30
|
skip("Add a hash of attributes invalid for your model")
|
31
|
-
|
31
|
+
end
|
32
32
|
|
33
33
|
# This should return the minimal set of values that should be in the session
|
34
34
|
# in order to pass any filters (e.g. authentication) defined in
|
@@ -84,9 +84,9 @@ describe <%= controller_class_name %>Controller, :type => :controller do
|
|
84
84
|
describe "POST create" do
|
85
85
|
describe "with valid params" do
|
86
86
|
it "creates a new <%= class_name %>" do
|
87
|
-
expect
|
87
|
+
expect do
|
88
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
|
@@ -127,7 +127,8 @@ describe <%= controller_class_name %>Controller, :type => :controller do
|
|
127
127
|
<% else -%>
|
128
128
|
<%= file_name %> = <%= class_name %>.create! valid_attributes
|
129
129
|
<% end -%>
|
130
|
-
# expect_any_instance_of(<%= class_name %>)
|
130
|
+
# expect_any_instance_of(<%= class_name %>)
|
131
|
+
# .to receive(:update).with(new_attributes.inject({}){|_, (k, v)| _[k] = v.to_s; _})
|
131
132
|
put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => new_attributes}, valid_session
|
132
133
|
<%= file_name %>.reload
|
133
134
|
# skip("Add assertions for updated state")
|
@@ -187,9 +188,9 @@ describe <%= controller_class_name %>Controller, :type => :controller do
|
|
187
188
|
<% else -%>
|
188
189
|
<%= file_name %> = <%= class_name %>.create! valid_attributes
|
189
190
|
<% end -%>
|
190
|
-
expect
|
191
|
+
expect do
|
191
192
|
delete :destroy, {:id => <%= file_name %>.to_param}, valid_session
|
192
|
-
|
193
|
+
end.to change(<%= class_name %>, :count).by(-1)
|
193
194
|
end
|
194
195
|
|
195
196
|
it "redirects to the <%= table_name %> list" do
|
@@ -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
|
+
# stub: rspec_rails_scaffold_templates 1.0.3 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.0.3"
|
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 = "2014-
|
14
|
+
s.date = "2014-10-13"
|
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.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitri Koulikoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|