wilson (owner)

Revisions

gist: 46919 Download_button fork
public
Public Clone URL: git://gist.github.com/46919.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
本拠> rake rspec:pre_commit ~/code/rspec-dev/example_rails_app
(in /Users/wilson/code/rspec-dev/example_rails_app)
running against rails 2.2.2
#####################################################
running pre_commit against rails 2.2.2
#####################################################
HEAD is now at ff56137... Doc updates
#####################################################
rm -rf db/*.db
#####################################################
Migrating down and reverting config/routes.rb
#####################################################
(in /Users/wilson/code/rspec-dev/example_rails_app)
running against rails 2.2.2
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
running against rails 2.2.2
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
#####################################################
Removing generated files for purchases resource
rm -rf app/helpers/purchases_helper.rb
rm -rf app/models/purchase.rb
rm -rf app/controllers/purchases_controller.rb
rm -rf app/views/purchases
rm -rf spec/models/purchase_spec.rb
rm -rf spec/helpers/purchases_helper_spec.rb
rm -rf spec/controllers/purchases_controller_spec.rb
rm -rf spec/controllers/purchases_routing_spec.rb
rm -rf spec/fixtures/purchases.yml
rm -rf spec/views/purchases
#####################################################
#####################################################
Removing files generated for event model
rm -rf app/models/event.rb
rm -rf spec/models/event_spec.rb
#####################################################
#####################################################
Removing files generated for account model
rm -rf app/models/account.rb
rm -rf spec/models/account_spec.rb
rm -rf spec/fixtures/accounts.yml
#####################################################
#####################################################
Removing generated files for login controller
rm -rf app/helpers/login_helper.rb
rm -rf app/controllers/login_controller.rb
rm -rf app/views/login
rm -rf spec/helpers/login_helper_spec.rb
rm -rf spec/controllers/login_controller_spec.rb
rm -rf spec/views/login
#####################################################
rm -rf script/autospec
rm -rf script/spec
rm -rf script/spec_server
rm -rf spec/spec_helper.rb
rm -rf spec/spec.opts
rm -rf spec/rcov.opts
rm -rf lib/tasks/rspec.rake
rm -rf stories/all.rb
rm -rf stories/helper.rb
#####################################################
ruby script/generate rspec_controller login signup login logout --force
#####################################################
#####################################################
ruby script/generate rspec_model account name:string balance_in_cents:integer --force
#####################################################
#####################################################
ruby script/generate rspec_model event name:string date:date --skip-fixture --force
#####################################################
#####################################################
ruby script/generate rspec_scaffold purchase order_id:integer created_at:datetime amount:decimal keyword:string description:text --force
#####################################################
(in /Users/wilson/code/rspec-dev/example_rails_app)
running against rails 2.2.2
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
running against rails 2.2.2
** Execute db:migrate
== CreateAccounts: migrating =================================================
-- create_table(:accounts)
   -> 0.0035s
== CreateAccounts: migrated (0.0037s) ========================================
 
== CreateEvents: migrating ===================================================
-- create_table(:events)
   -> 0.0024s
== CreateEvents: migrated (0.0025s) ==========================================
 
== CreatePurchases: migrating ================================================
-- create_table(:purchases)
   -> 0.0025s
== CreatePurchases: migrated (0.0026s) =======================================
 
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
rake aborted!
Command /usr/local/bin/ruby -I"/Users/wilson/code/rspec-dev/example_rails_app/vendor/plugins/rspec/lib" "/Users/wilson/code/rspec-dev/example_rails_app/vendor/plugins/rspec/bin/spec" "spec/controllers/login_controller_spec.rb" "spec/controllers/purchases_controller_spec.rb" "spec/controllers/purchases_routing_spec.rb" "spec/helpers/login_helper_spec.rb" "spec/helpers/purchases_helper_spec.rb" "spec/models/account_spec.rb" "spec/models/event_spec.rb" "spec/models/purchase_spec.rb" "spec/views/login/login.html.erb_spec.rb" "spec/views/login/logout.html.erb_spec.rb" "spec/views/login/signup.html.erb_spec.rb" "spec/views/purchases/edit.html.erb_spec.rb" "spec/views/purchases/index.html.erb_spec.rb" "spec/views/purchases/new.html.erb_spec.rb" "spec/views/purchases/show.html.erb_spec.rb" --options "/Users/wilson/code/rspec-dev/example_rails_app/config/../spec/spec.opts" failed
/Users/wilson/code/rspec-dev/example_rails_app/vendor/plugins/rspec/lib/spec/rake/spectask.rb:175:in `define'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/rake_file_utils.rb:153:in `verbose'
/Users/wilson/code/rspec-dev/example_rails_app/vendor/plugins/rspec/lib/spec/rake/spectask.rb:151:in `define'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/task.rb:178:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/task.rb:178:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/task.rb:173:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/task.rb:173:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/task.rb:139:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/task.rb:132:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/task.rb:125:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:110:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:90:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:90:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:90:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:127:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:84:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:62:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:127:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/lib/rake/application.rb:59:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3.99/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
ERROR while running rake: rake spec --trace
(in /Users/wilson/code/rspec-dev/example_rails_app)
running against rails 2.2.2
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
running against rails 2.2.2
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
** Execute db:test:load
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
** Execute spec
running against rails 2.2.2
............F.................................F
 
1)
'/purchases/index.html.erb should render list of purchases' FAILED
2.
<false> is not true.
./spec/views/purchases/index.html.erb_spec.rb:26:
 
2)
'/purchases/show.html.erb should render attributes in <p>' FAILED
expected /9\.99/, got "<p>\n <b>Order:</b>\n 1\n</p>\n\n<p>\n <b>Created at:</b>\n \n</p>\n\n<p>\n <b>Amount:</b>\n 9\n</p>\n\n<p>\n <b>Keyword:</b>\n value for keyword\n</p>\n\n<p>\n <b>Description:</b>\n value for description\n</p>\n\n\n<a href=\"/purchases/1022/edit\">Edit</a> |\n<a href=\"/purchases\">Back</a>\n"
./spec/views/purchases/show.html.erb_spec.rb:17:
 
Finished in 0.301581 seconds
 
47 examples, 2 failures
 
#####################################################
Migrating down and reverting config/routes.rb
#####################################################
(in /Users/wilson/code/rspec-dev/example_rails_app)
running against rails 2.2.2
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
running against rails 2.2.2
** Execute db:migrate
== CreatePurchases: reverting ================================================
-- drop_table(:purchases)
   -> 0.0013s
== CreatePurchases: reverted (0.0014s) =======================================
 
== CreateEvents: reverting ===================================================
-- drop_table(:events)
   -> 0.0015s
== CreateEvents: reverted (0.0016s) ==========================================
 
== CreateAccounts: reverting =================================================
-- drop_table(:accounts)
   -> 0.0016s
== CreateAccounts: reverted (0.0017s) ========================================
 
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
#####################################################
Removing generated files for purchases resource
rm -rf app/helpers/purchases_helper.rb
rm -rf app/models/purchase.rb
rm -rf app/controllers/purchases_controller.rb
rm -rf app/views/purchases
rm -rf spec/models/purchase_spec.rb
rm -rf spec/helpers/purchases_helper_spec.rb
rm -rf spec/controllers/purchases_controller_spec.rb
rm -rf spec/controllers/purchases_routing_spec.rb
rm -rf spec/fixtures/purchases.yml
rm -rf spec/views/purchases
rm -rf db/migrate/20090114145034_create_purchases.rb
#####################################################
#####################################################
Removing files generated for event model
rm -rf app/models/event.rb
rm -rf spec/models/event_spec.rb
rm -rf db/migrate/20090114145033_create_events.rb
#####################################################
#####################################################
Removing files generated for account model
rm -rf app/models/account.rb
rm -rf spec/models/account_spec.rb
rm -rf spec/fixtures/accounts.yml
rm -rf db/migrate/20090114145031_create_accounts.rb
#####################################################
#####################################################
Removing generated files for login controller
rm -rf app/helpers/login_helper.rb
rm -rf app/controllers/login_controller.rb
rm -rf app/views/login
rm -rf spec/helpers/login_helper_spec.rb
rm -rf spec/controllers/login_controller_spec.rb
rm -rf spec/views/login
#####################################################
rm -rf script/autospec
rm -rf script/spec
rm -rf script/spec_server
rm -rf spec/spec_helper.rb
rm -rf spec/spec.opts
rm -rf spec/rcov.opts
rm -rf lib/tasks/rspec.rake
rm -rf stories/all.rb
rm -rf stories/helper.rb