enju_biblio 0.1.0.pre56 → 0.1.0.pre57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/agent_import_files_controller.rb +1 -1
  3. data/app/controllers/agent_import_results_controller.rb +30 -6
  4. data/app/controllers/agent_relationship_types_controller.rb +74 -4
  5. data/app/controllers/agent_relationships_controller.rb +92 -10
  6. data/app/controllers/agent_types_controller.rb +74 -3
  7. data/app/controllers/carrier_types_controller.rb +1 -1
  8. data/app/controllers/content_types_controller.rb +74 -4
  9. data/app/controllers/countries_controller.rb +66 -4
  10. data/app/controllers/create_types_controller.rb +74 -3
  11. data/app/controllers/extents_controller.rb +74 -4
  12. data/app/controllers/form_of_works_controller.rb +74 -4
  13. data/app/controllers/frequencies_controller.rb +74 -4
  14. data/app/controllers/identifier_types_controller.rb +4 -5
  15. data/app/controllers/import_requests_controller.rb +1 -1
  16. data/app/controllers/languages_controller.rb +66 -4
  17. data/app/controllers/licenses_controller.rb +74 -3
  18. data/app/controllers/manifestation_relationship_types_controller.rb +74 -3
  19. data/app/controllers/manifestation_relationships_controller.rb +92 -9
  20. data/app/controllers/medium_of_performances_controller.rb +74 -3
  21. data/app/controllers/picture_files_controller.rb +34 -10
  22. data/app/controllers/produce_types_controller.rb +74 -3
  23. data/app/controllers/realize_types_controller.rb +74 -3
  24. data/app/controllers/resource_import_files_controller.rb +2 -1
  25. data/app/controllers/resource_import_results_controller.rb +31 -11
  26. data/app/models/agent_import_file.rb +1 -1
  27. data/app/models/agent_import_result.rb +0 -2
  28. data/app/models/carrier_type.rb +1 -1
  29. data/app/models/identifier.rb +5 -0
  30. data/app/models/item.rb +1 -1
  31. data/app/models/manifestation.rb +13 -8
  32. data/app/models/resource_import_file.rb +73 -79
  33. data/app/views/agent_import_files/index.html.erb +1 -0
  34. data/app/views/agent_relationship_types/index.html.erb +5 -4
  35. data/app/views/agent_types/index.html.erb +5 -4
  36. data/app/views/carrier_types/index.html.erb +2 -1
  37. data/app/views/content_types/index.html.erb +1 -0
  38. data/app/views/countries/show.html.erb +5 -0
  39. data/app/views/create_types/index.html.erb +5 -4
  40. data/app/views/extents/index.html.erb +2 -1
  41. data/app/views/form_of_works/index.html.erb +2 -1
  42. data/app/views/frequencies/index.html.erb +2 -1
  43. data/app/views/identifier_types/index.html.erb +12 -5
  44. data/app/views/import_requests/index.html.erb +1 -0
  45. data/app/views/items/show.html.erb +3 -7
  46. data/app/views/languages/_form.html.erb +19 -4
  47. data/app/views/languages/index.html.erb +6 -5
  48. data/app/views/languages/show.html.erb +19 -4
  49. data/app/views/layouts/manifestations.html.erb +2 -1
  50. data/app/views/licenses/index.html.erb +2 -1
  51. data/app/views/manifestation_relationship_types/index.html.erb +5 -4
  52. data/app/views/manifestations/_call_number.html.erb +1 -1
  53. data/app/views/manifestations/_edit_detail.html.erb +4 -1
  54. data/app/views/manifestations/_form.html.erb +5 -5
  55. data/app/views/manifestations/_show_detail_librarian.html.erb +8 -3
  56. data/app/views/manifestations/_show_detail_user.html.erb +8 -3
  57. data/app/views/medium_of_performances/index.html.erb +2 -1
  58. data/app/views/notifier/manifestation_info.en.text.erb +1 -1
  59. data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
  60. data/app/views/picture_files/_index.html.erb +1 -0
  61. data/app/views/picture_files/_index_agent.html.erb +1 -0
  62. data/app/views/picture_files/_index_manifestation.html.erb +1 -0
  63. data/app/views/picture_files/show.html.erb +15 -7
  64. data/app/views/produce_types/index.html.erb +5 -4
  65. data/app/views/realize_types/index.html.erb +5 -4
  66. data/app/views/resource_import_files/index.html.erb +1 -0
  67. data/app/views/series_statements/_index.html.erb +1 -0
  68. data/app/views/series_statements/_index_series_statement_merge_list.html.erb +1 -0
  69. data/config/locales/translation_en.yml +70 -1
  70. data/config/locales/translation_ja.yml +77 -8
  71. data/db/migrate/20140817155043_add_extent_of_text_to_manifestation.rb +5 -0
  72. data/lib/enju_biblio/biblio_helper.rb +13 -0
  73. data/lib/enju_biblio/engine.rb +0 -2
  74. data/lib/enju_biblio/version.rb +1 -1
  75. data/lib/generators/enju_biblio/setup/templates/db/fixtures/content_types.yml +1 -1
  76. data/lib/generators/enju_biblio/setup/templates/db/fixtures/identifier_types.yml +24 -3
  77. data/lib/tasks/enju_biblio_tasks.rake +2 -0
  78. data/lib/tasks/identifier_type.rb +12 -0
  79. data/lib/tasks/item.rb +1 -1
  80. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_send_message_when_import_is_completed.yml +433 -0
  81. data/spec/controllers/agent_import_files_controller_spec.rb +35 -35
  82. data/spec/controllers/agent_import_results_controller_spec.rb +11 -11
  83. data/spec/controllers/agent_relationship_types_controller_spec.rb +51 -51
  84. data/spec/controllers/agent_relationships_controller_spec.rb +53 -53
  85. data/spec/controllers/agent_types_controller_spec.rb +15 -15
  86. data/spec/controllers/agents_controller_spec.rb +96 -96
  87. data/spec/controllers/carrier_types_controller_spec.rb +15 -15
  88. data/spec/controllers/content_types_controller_spec.rb +15 -15
  89. data/spec/controllers/countries_controller_spec.rb +25 -25
  90. data/spec/controllers/create_types_controller_spec.rb +15 -15
  91. data/spec/controllers/creates_controller_spec.rb +50 -50
  92. data/spec/controllers/donates_controller_spec.rb +49 -49
  93. data/spec/controllers/extents_controller_spec.rb +15 -15
  94. data/spec/controllers/form_of_works_controller_spec.rb +15 -15
  95. data/spec/controllers/frequencies_controller_spec.rb +6 -6
  96. data/spec/controllers/identifier_types_controller_spec.rb +15 -15
  97. data/spec/controllers/import_requests_controller_spec.rb +50 -50
  98. data/spec/controllers/items_controller_spec.rb +72 -72
  99. data/spec/controllers/languages_controller_spec.rb +18 -18
  100. data/spec/controllers/licenses_controller_spec.rb +15 -15
  101. data/spec/controllers/manifestation_relationship_types_controller_spec.rb +51 -51
  102. data/spec/controllers/manifestation_relationships_controller_spec.rb +53 -53
  103. data/spec/controllers/manifestations_controller_spec.rb +108 -108
  104. data/spec/controllers/medium_of_performances_controller_spec.rb +15 -15
  105. data/spec/controllers/owns_controller_spec.rb +52 -52
  106. data/spec/controllers/picture_files_controller_spec.rb +52 -52
  107. data/spec/controllers/produce_types_controller_spec.rb +15 -15
  108. data/spec/controllers/produces_controller_spec.rb +50 -50
  109. data/spec/controllers/realize_types_controller_spec.rb +15 -15
  110. data/spec/controllers/realizes_controller_spec.rb +51 -51
  111. data/spec/controllers/resource_export_files_controller_spec.rb +38 -38
  112. data/spec/controllers/resource_import_files_controller_spec.rb +38 -38
  113. data/spec/controllers/resource_import_results_controller_spec.rb +15 -15
  114. data/spec/controllers/series_statements_controller_spec.rb +54 -54
  115. data/spec/dummy/db/development.sqlite3 +0 -0
  116. data/spec/dummy/db/schema.rb +2 -3
  117. data/spec/dummy/db/test.sqlite3 +0 -0
  118. data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv +19 -19
  119. data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample2.tsv +19 -19
  120. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-53863-1jz1wlr.txt +147 -0
  121. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-55246-1rvhs1s.txt +147 -0
  122. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60268-1psjqua.txt +147 -0
  123. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60996-1cy28m2.txt +147 -0
  124. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-67507-19qjhj3.txt +147 -0
  125. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-69234-1cllrec.txt +147 -0
  126. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-76875-1os6joy.txt +147 -0
  127. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-1148-136brhb.txt +147 -0
  128. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-473-1c326dm.txt +147 -0
  129. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-93795-1x882ik.txt +147 -0
  130. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94274-1xr9d9e.txt +147 -0
  131. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94643-1fjcept.txt +147 -0
  132. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-97947-mfqh5b.txt +147 -0
  133. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98488-126cvb4.txt +147 -0
  134. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98849-1lg47mm.txt +147 -0
  135. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  136. data/spec/dummy/solr/test/data/index/segments_5ur +0 -0
  137. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007580 +0 -0
  138. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007581 +0 -0
  139. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007582 +0 -0
  140. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007583 +0 -0
  141. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007584 +0 -0
  142. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007585 +0 -0
  143. data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
  144. data/spec/dummy/tmp/cache/stdout +2554 -0
  145. data/spec/dummy/tmp/pids/redis-test.pid +1 -1
  146. data/spec/fixtures/agent_import_results.yml +0 -3
  147. data/spec/fixtures/carrier_types.yml +16 -16
  148. data/spec/fixtures/content_types.yml +78 -29
  149. data/spec/fixtures/frequencies.yml +32 -62
  150. data/spec/fixtures/manifestations.yml +1 -1
  151. data/spec/models/agent_import_result_spec.rb +0 -2
  152. data/spec/models/manifestation_spec.rb +1 -1
  153. data/spec/models/resource_import_file_spec.rb +30 -3
  154. data/spec/views/manifestations/show.html.erb_spec.rb +1 -1
  155. metadata +68 -103
  156. data/app/views/picture_files/_index_event.html.erb +0 -53
  157. data/app/views/picture_files/_index_shelf.html.erb +0 -53
  158. data/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
  159. data/spec/dummy/solr/test/data/index/_20i.fdt +0 -0
  160. data/spec/dummy/solr/test/data/index/_20i.fdx +0 -0
  161. data/spec/dummy/solr/test/data/index/_20i.fnm +0 -0
  162. data/spec/dummy/solr/test/data/index/_20i.nvd +0 -0
  163. data/spec/dummy/solr/test/data/index/_20i.nvm +0 -0
  164. data/spec/dummy/solr/test/data/index/_20i.si +0 -0
  165. data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.doc +0 -0
  166. data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.pos +0 -0
  167. data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.tim +0 -0
  168. data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.tip +0 -0
  169. data/spec/dummy/solr/test/data/index/_20j.fdt +0 -0
  170. data/spec/dummy/solr/test/data/index/_20j.fdx +0 -0
  171. data/spec/dummy/solr/test/data/index/_20j.fnm +0 -0
  172. data/spec/dummy/solr/test/data/index/_20j.nvd +0 -0
  173. data/spec/dummy/solr/test/data/index/_20j.nvm +0 -0
  174. data/spec/dummy/solr/test/data/index/_20j.si +0 -0
  175. data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.doc +0 -0
  176. data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.pos +0 -0
  177. data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.tim +0 -0
  178. data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.tip +0 -0
  179. data/spec/dummy/solr/test/data/index/_20k.fdt +0 -0
  180. data/spec/dummy/solr/test/data/index/_20k.fdx +0 -0
  181. data/spec/dummy/solr/test/data/index/_20k.fnm +0 -0
  182. data/spec/dummy/solr/test/data/index/_20k.nvd +0 -0
  183. data/spec/dummy/solr/test/data/index/_20k.nvm +0 -0
  184. data/spec/dummy/solr/test/data/index/_20k.si +0 -0
  185. data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.doc +0 -0
  186. data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.pos +0 -0
  187. data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.tim +0 -0
  188. data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.tip +0 -0
  189. data/spec/dummy/solr/test/data/index/segments_2uc +0 -0
  190. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003680 +0 -0
  191. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003681 +0 -0
  192. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003682 +0 -0
@@ -19,7 +19,7 @@ describe CreatesController do
19
19
 
20
20
  it "assigns all creates as @creates" do
21
21
  get :index
22
- assigns(:creates).should eq(Create.all)
22
+ expect(assigns(:creates)).to eq(Create.all)
23
23
  end
24
24
  end
25
25
 
@@ -28,7 +28,7 @@ describe CreatesController do
28
28
 
29
29
  it "assigns all creates as @creates" do
30
30
  get :index
31
- assigns(:creates).should eq(Create.all)
31
+ expect(assigns(:creates)).to eq(Create.all)
32
32
  end
33
33
  end
34
34
 
@@ -37,14 +37,14 @@ describe CreatesController do
37
37
 
38
38
  it "assigns all creates as @creates" do
39
39
  get :index
40
- assigns(:creates).should eq(Create.all)
40
+ expect(assigns(:creates)).to eq(Create.all)
41
41
  end
42
42
  end
43
43
 
44
44
  describe "When not logged in" do
45
45
  it "assigns all creates as @creates" do
46
46
  get :index
47
- assigns(:creates).should eq(Create.all)
47
+ expect(assigns(:creates)).to eq(Create.all)
48
48
  end
49
49
  end
50
50
  end
@@ -56,7 +56,7 @@ describe CreatesController do
56
56
  it "assigns the requested create as @create" do
57
57
  create = FactoryGirl.create(:create)
58
58
  get :show, :id => create.id
59
- assigns(:create).should eq(create)
59
+ expect(assigns(:create)).to eq(create)
60
60
  end
61
61
  end
62
62
 
@@ -66,7 +66,7 @@ describe CreatesController do
66
66
  it "assigns the requested create as @create" do
67
67
  create = FactoryGirl.create(:create)
68
68
  get :show, :id => create.id
69
- assigns(:create).should eq(create)
69
+ expect(assigns(:create)).to eq(create)
70
70
  end
71
71
  end
72
72
 
@@ -76,7 +76,7 @@ describe CreatesController do
76
76
  it "assigns the requested create as @create" do
77
77
  create = FactoryGirl.create(:create)
78
78
  get :show, :id => create.id
79
- assigns(:create).should eq(create)
79
+ expect(assigns(:create)).to eq(create)
80
80
  end
81
81
  end
82
82
 
@@ -84,7 +84,7 @@ describe CreatesController do
84
84
  it "assigns the requested create as @create" do
85
85
  create = FactoryGirl.create(:create)
86
86
  get :show, :id => create.id
87
- assigns(:create).should eq(create)
87
+ expect(assigns(:create)).to eq(create)
88
88
  end
89
89
  end
90
90
  end
@@ -95,7 +95,7 @@ describe CreatesController do
95
95
 
96
96
  it "assigns the requested create as @create" do
97
97
  get :new
98
- assigns(:create).should_not be_valid
98
+ expect(assigns(:create)).not_to be_valid
99
99
  end
100
100
  end
101
101
 
@@ -104,7 +104,7 @@ describe CreatesController do
104
104
 
105
105
  it "assigns the requested create as @create" do
106
106
  get :new
107
- assigns(:create).should_not be_valid
107
+ expect(assigns(:create)).not_to be_valid
108
108
  end
109
109
  end
110
110
 
@@ -113,16 +113,16 @@ describe CreatesController do
113
113
 
114
114
  it "should not assign the requested create as @create" do
115
115
  get :new
116
- assigns(:create).should_not be_valid
117
- response.should be_forbidden
116
+ expect(assigns(:create)).not_to be_valid
117
+ expect(response).to be_forbidden
118
118
  end
119
119
  end
120
120
 
121
121
  describe "When not logged in" do
122
122
  it "should not assign the requested create as @create" do
123
123
  get :new
124
- assigns(:create).should_not be_valid
125
- response.should redirect_to(new_user_session_url)
124
+ expect(assigns(:create)).not_to be_valid
125
+ expect(response).to redirect_to(new_user_session_url)
126
126
  end
127
127
  end
128
128
  end
@@ -134,7 +134,7 @@ describe CreatesController do
134
134
  it "assigns the requested create as @create" do
135
135
  create = FactoryGirl.create(:create)
136
136
  get :edit, :id => create.id
137
- assigns(:create).should eq(create)
137
+ expect(assigns(:create)).to eq(create)
138
138
  end
139
139
  end
140
140
 
@@ -144,7 +144,7 @@ describe CreatesController do
144
144
  it "assigns the requested create as @create" do
145
145
  create = FactoryGirl.create(:create)
146
146
  get :edit, :id => create.id
147
- assigns(:create).should eq(create)
147
+ expect(assigns(:create)).to eq(create)
148
148
  end
149
149
  end
150
150
 
@@ -154,7 +154,7 @@ describe CreatesController do
154
154
  it "assigns the requested create as @create" do
155
155
  create = FactoryGirl.create(:create)
156
156
  get :edit, :id => create.id
157
- response.should be_forbidden
157
+ expect(response).to be_forbidden
158
158
  end
159
159
  end
160
160
 
@@ -162,7 +162,7 @@ describe CreatesController do
162
162
  it "should not assign the requested create as @create" do
163
163
  create = FactoryGirl.create(:create)
164
164
  get :edit, :id => create.id
165
- response.should redirect_to(new_user_session_url)
165
+ expect(response).to redirect_to(new_user_session_url)
166
166
  end
167
167
  end
168
168
  end
@@ -179,24 +179,24 @@ describe CreatesController do
179
179
  describe "with valid params" do
180
180
  it "assigns a newly created create as @create" do
181
181
  post :create, :create => @attrs
182
- assigns(:create).should be_valid
182
+ expect(assigns(:create)).to be_valid
183
183
  end
184
184
 
185
185
  it "redirects to the created create" do
186
186
  post :create, :create => @attrs
187
- response.should redirect_to(create_url(assigns(:create)))
187
+ expect(response).to redirect_to(create_url(assigns(:create)))
188
188
  end
189
189
  end
190
190
 
191
191
  describe "with invalid params" do
192
192
  it "assigns a newly created but unsaved create as @create" do
193
193
  post :create, :create => @invalid_attrs
194
- assigns(:create).should_not be_valid
194
+ expect(assigns(:create)).not_to be_valid
195
195
  end
196
196
 
197
197
  it "re-renders the 'new' template" do
198
198
  post :create, :create => @invalid_attrs
199
- response.should render_template("new")
199
+ expect(response).to render_template("new")
200
200
  end
201
201
  end
202
202
  end
@@ -207,24 +207,24 @@ describe CreatesController do
207
207
  describe "with valid params" do
208
208
  it "assigns a newly created create as @create" do
209
209
  post :create, :create => @attrs
210
- assigns(:create).should be_valid
210
+ expect(assigns(:create)).to be_valid
211
211
  end
212
212
 
213
213
  it "redirects to the created create" do
214
214
  post :create, :create => @attrs
215
- response.should redirect_to(create_url(assigns(:create)))
215
+ expect(response).to redirect_to(create_url(assigns(:create)))
216
216
  end
217
217
  end
218
218
 
219
219
  describe "with invalid params" do
220
220
  it "assigns a newly created but unsaved create as @create" do
221
221
  post :create, :create => @invalid_attrs
222
- assigns(:create).should_not be_valid
222
+ expect(assigns(:create)).not_to be_valid
223
223
  end
224
224
 
225
225
  it "re-renders the 'new' template" do
226
226
  post :create, :create => @invalid_attrs
227
- response.should render_template("new")
227
+ expect(response).to render_template("new")
228
228
  end
229
229
  end
230
230
  end
@@ -235,24 +235,24 @@ describe CreatesController do
235
235
  describe "with valid params" do
236
236
  it "assigns a newly created create as @create" do
237
237
  post :create, :create => @attrs
238
- assigns(:create).should be_valid
238
+ expect(assigns(:create)).to be_valid
239
239
  end
240
240
 
241
241
  it "should be forbidden" do
242
242
  post :create, :create => @attrs
243
- response.should be_forbidden
243
+ expect(response).to be_forbidden
244
244
  end
245
245
  end
246
246
 
247
247
  describe "with invalid params" do
248
248
  it "assigns a newly created but unsaved create as @create" do
249
249
  post :create, :create => @invalid_attrs
250
- assigns(:create).should_not be_valid
250
+ expect(assigns(:create)).not_to be_valid
251
251
  end
252
252
 
253
253
  it "should be forbidden" do
254
254
  post :create, :create => @invalid_attrs
255
- response.should be_forbidden
255
+ expect(response).to be_forbidden
256
256
  end
257
257
  end
258
258
  end
@@ -261,24 +261,24 @@ describe CreatesController do
261
261
  describe "with valid params" do
262
262
  it "assigns a newly created create as @create" do
263
263
  post :create, :create => @attrs
264
- assigns(:create).should be_valid
264
+ expect(assigns(:create)).to be_valid
265
265
  end
266
266
 
267
267
  it "should be forbidden" do
268
268
  post :create, :create => @attrs
269
- response.should redirect_to(new_user_session_url)
269
+ expect(response).to redirect_to(new_user_session_url)
270
270
  end
271
271
  end
272
272
 
273
273
  describe "with invalid params" do
274
274
  it "assigns a newly created but unsaved create as @create" do
275
275
  post :create, :create => @invalid_attrs
276
- assigns(:create).should_not be_valid
276
+ expect(assigns(:create)).not_to be_valid
277
277
  end
278
278
 
279
279
  it "should be redirected to new session url" do
280
280
  post :create, :create => @invalid_attrs
281
- response.should redirect_to(new_user_session_url)
281
+ expect(response).to redirect_to(new_user_session_url)
282
282
  end
283
283
  end
284
284
  end
@@ -301,14 +301,14 @@ describe CreatesController do
301
301
 
302
302
  it "assigns the requested create as @create" do
303
303
  put :update, :id => @create.id, :create => @attrs
304
- assigns(:create).should eq(@create)
304
+ expect(assigns(:create)).to eq(@create)
305
305
  end
306
306
  end
307
307
 
308
308
  describe "with invalid params" do
309
309
  it "assigns the requested create as @create" do
310
310
  put :update, :id => @create.id, :create => @invalid_attrs
311
- response.should render_template("edit")
311
+ expect(response).to render_template("edit")
312
312
  end
313
313
  end
314
314
  end
@@ -323,14 +323,14 @@ describe CreatesController do
323
323
 
324
324
  it "assigns the requested create as @create" do
325
325
  put :update, :id => @create.id, :create => @attrs
326
- assigns(:create).should eq(@create)
327
- response.should redirect_to(@create)
326
+ expect(assigns(:create)).to eq(@create)
327
+ expect(response).to redirect_to(@create)
328
328
  end
329
329
 
330
330
  it "moves its position when specified" do
331
331
  position = @create.position
332
332
  put :update, :id => @create.id, :work_id => @create.work.id, :move => 'lower'
333
- response.should redirect_to creates_url(work_id: @create.work_id)
333
+ expect(response).to redirect_to creates_url(work_id: @create.work_id)
334
334
  assigns(:create).position.should eq position + 1
335
335
  end
336
336
  end
@@ -338,12 +338,12 @@ describe CreatesController do
338
338
  describe "with invalid params" do
339
339
  it "assigns the create as @create" do
340
340
  put :update, :id => @create, :create => @invalid_attrs
341
- assigns(:create).should_not be_valid
341
+ expect(assigns(:create)).not_to be_valid
342
342
  end
343
343
 
344
344
  it "re-renders the 'edit' template" do
345
345
  put :update, :id => @create, :create => @invalid_attrs
346
- response.should render_template("edit")
346
+ expect(response).to render_template("edit")
347
347
  end
348
348
  end
349
349
  end
@@ -358,15 +358,15 @@ describe CreatesController do
358
358
 
359
359
  it "assigns the requested create as @create" do
360
360
  put :update, :id => @create.id, :create => @attrs
361
- assigns(:create).should eq(@create)
362
- response.should be_forbidden
361
+ expect(assigns(:create)).to eq(@create)
362
+ expect(response).to be_forbidden
363
363
  end
364
364
  end
365
365
 
366
366
  describe "with invalid params" do
367
367
  it "assigns the requested create as @create" do
368
368
  put :update, :id => @create.id, :create => @invalid_attrs
369
- response.should be_forbidden
369
+ expect(response).to be_forbidden
370
370
  end
371
371
  end
372
372
  end
@@ -379,14 +379,14 @@ describe CreatesController do
379
379
 
380
380
  it "should be forbidden" do
381
381
  put :update, :id => @create.id, :create => @attrs
382
- response.should redirect_to(new_user_session_url)
382
+ expect(response).to redirect_to(new_user_session_url)
383
383
  end
384
384
  end
385
385
 
386
386
  describe "with invalid params" do
387
387
  it "assigns the requested create as @create" do
388
388
  put :update, :id => @create.id, :create => @invalid_attrs
389
- response.should redirect_to(new_user_session_url)
389
+ expect(response).to redirect_to(new_user_session_url)
390
390
  end
391
391
  end
392
392
  end
@@ -406,7 +406,7 @@ describe CreatesController do
406
406
 
407
407
  it "redirects to the creates list" do
408
408
  delete :destroy, :id => @create.id
409
- response.should redirect_to(creates_url)
409
+ expect(response).to redirect_to(creates_url)
410
410
  end
411
411
  end
412
412
 
@@ -419,7 +419,7 @@ describe CreatesController do
419
419
 
420
420
  it "should be forbidden" do
421
421
  delete :destroy, :id => @create.id
422
- response.should redirect_to(creates_url)
422
+ expect(response).to redirect_to(creates_url)
423
423
  end
424
424
  end
425
425
 
@@ -432,7 +432,7 @@ describe CreatesController do
432
432
 
433
433
  it "should be forbidden" do
434
434
  delete :destroy, :id => @create.id
435
- response.should be_forbidden
435
+ expect(response).to be_forbidden
436
436
  end
437
437
  end
438
438
 
@@ -443,7 +443,7 @@ describe CreatesController do
443
443
 
444
444
  it "should be forbidden" do
445
445
  delete :destroy, :id => @create.id
446
- response.should redirect_to(new_user_session_url)
446
+ expect(response).to redirect_to(new_user_session_url)
447
447
  end
448
448
  end
449
449
  end