ruote-kit 2.2.0.3 → 2.3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/CHANGELOG.txt +28 -1
  2. data/CREDITS.txt +8 -2
  3. data/LICENSE.txt +1 -1
  4. data/Rakefile +21 -9
  5. data/lib/ruote-kit.rb +13 -4
  6. data/lib/ruote-kit/core_ext.rb +15 -0
  7. data/lib/ruote-kit/helpers/json_helpers.rb +22 -7
  8. data/lib/ruote-kit/helpers/link_helpers.rb +9 -7
  9. data/lib/ruote-kit/helpers/pagination_helpers.rb +1 -2
  10. data/lib/ruote-kit/helpers/render_helpers.rb +1 -1
  11. data/lib/ruote-kit/public/_ruote/images/favicon.png +0 -0
  12. data/lib/ruote-kit/public/_ruote/images/{ruote_buttons.png → ruote-buttons.png} +0 -0
  13. data/lib/ruote-kit/public/_ruote/images/ruote.png +0 -0
  14. data/lib/ruote-kit/public/_ruote/javascripts/foolbox-all.min.js +3 -0
  15. data/lib/ruote-kit/public/_ruote/javascripts/jquery-1.9.1.min.js +5 -0
  16. data/lib/ruote-kit/public/_ruote/javascripts/rk.js +68 -17
  17. data/lib/ruote-kit/public/_ruote/javascripts/ruote-fluo-all.min.js +3 -0
  18. data/lib/ruote-kit/public/_ruote/stylesheets/rk.css +82 -12
  19. data/lib/ruote-kit/public/_ruote/stylesheets/ruote-buttons.png +0 -0
  20. data/lib/ruote-kit/public/_ruote/stylesheets/ruote-fluo-editor.css +9 -6
  21. data/lib/ruote-kit/public/_ruote/stylesheets/ruote-fluo.css +62 -0
  22. data/lib/ruote-kit/resources/errors.rb +8 -3
  23. data/lib/ruote-kit/resources/expressions.rb +38 -35
  24. data/lib/ruote-kit/resources/participants.rb +1 -1
  25. data/lib/ruote-kit/resources/processes.rb +61 -4
  26. data/lib/ruote-kit/resources/workitems.rb +4 -4
  27. data/lib/ruote-kit/version.rb +1 -1
  28. data/lib/ruote-kit/views/_pagination.html.haml +2 -2
  29. data/lib/ruote-kit/views/_tree_editor.html.haml +63 -30
  30. data/lib/ruote-kit/views/error.html.haml +50 -9
  31. data/lib/ruote-kit/views/errors.html.haml +1 -1
  32. data/lib/ruote-kit/views/expression.html.haml +83 -33
  33. data/lib/ruote-kit/views/expressions.html.haml +23 -8
  34. data/lib/ruote-kit/views/http_error.html.haml +9 -2
  35. data/lib/ruote-kit/views/layout.html.haml +14 -13
  36. data/lib/ruote-kit/views/process.html.haml +75 -20
  37. data/lib/ruote-kit/views/processes.html.haml +9 -3
  38. data/lib/ruote-kit/views/processes_new.html.haml +19 -2
  39. data/lib/ruote-kit/views/schedules.html.haml +2 -2
  40. data/lib/ruote-kit/views/workitem.html.haml +17 -6
  41. data/ruote-kit.gemspec +9 -7
  42. data/spec/cases/orphan_workitem_spec.rb +141 -0
  43. data/spec/core_ext_spec.rb +19 -0
  44. data/spec/resources/errors_spec.rb +182 -156
  45. data/spec/resources/expressions_spec.rb +497 -379
  46. data/spec/resources/index_spec.rb +5 -5
  47. data/spec/resources/participants_spec.rb +64 -75
  48. data/spec/resources/processes_spec.rb +396 -277
  49. data/spec/resources/schedules_spec.rb +92 -76
  50. data/spec/resources/workitems_spec.rb +352 -343
  51. data/spec/ruote-kit_configure_spec.rb +41 -13
  52. data/spec/spec_helper.rb +6 -8
  53. data/spec/support/link_helper.rb +11 -0
  54. data/spec/webapp_helpers_spec.rb +29 -23
  55. metadata +161 -180
  56. data/README.rdoc +0 -313
  57. data/lib/ruote-kit/public/_ruote/images/favicon.ico +0 -0
  58. data/lib/ruote-kit/public/_ruote/javascripts/jquery-1.4.2.min.js +0 -154
  59. data/lib/ruote-kit/public/_ruote/javascripts/ruote-fluo-editor.js +0 -548
  60. data/lib/ruote-kit/public/_ruote/javascripts/ruote-fluo.js +0 -1118
@@ -0,0 +1,141 @@
1
+
2
+ require 'spec_helper'
3
+
4
+
5
+ describe RuoteKit do
6
+
7
+ context 'with an orphan workitem' do
8
+
9
+ before(:all) do
10
+
11
+ prepare_engine_with_participants
12
+
13
+ pdef = Ruote.process_definition :name => 'test' do
14
+ toto
15
+ end
16
+
17
+ #RuoteKit.engine.noisy = true
18
+
19
+ @wfid = RuoteKit.engine.launch(pdef)
20
+ RuoteKit.engine.wait_for(:toto)
21
+ RuoteKit.engine.wait_for(1)
22
+
23
+ @wi = RuoteKit.engine.storage_participant.first
24
+
25
+ RuoteKit.engine.cancel(@wfid)
26
+ RuoteKit.engine.wait_for('terminated')
27
+
28
+ @wi.h.delete('_rev')
29
+ RuoteKit.engine.storage.put(@wi.h)
30
+ end
31
+
32
+ after(:all) do
33
+
34
+ shutdown_and_purge_engine
35
+ end
36
+
37
+ describe 'GET /_ruote/processes' do
38
+
39
+ it 'does not list the process' do
40
+
41
+ get '/_ruote/processes.json'
42
+
43
+ last_response.status.should == 200
44
+
45
+ last_response.json_body['processes'].should == []
46
+ end
47
+ end
48
+
49
+ describe 'GET /_ruote/workitems' do
50
+
51
+ it 'lists the orphan workitem' do
52
+
53
+ get '/_ruote/workitems.json'
54
+
55
+ last_response.status.should == 200
56
+
57
+ last_response.json_body['workitems'].size.should == 1
58
+ last_response.json_body['workitems'][0]['id'].should == @wi.sid
59
+
60
+ links = last_response.json_body['workitems'][0]['links']
61
+
62
+ link_for(links, 'self').should ==
63
+ "/_ruote/workitems/#{@wi.sid}"
64
+ link_for(links, '#expression').should ==
65
+ "/_ruote/expressions/#{@wi.sid}"
66
+ end
67
+ end
68
+
69
+ describe 'GET /_ruote/workitems/:wfid' do
70
+
71
+ it 'lists the orphan workitems' do
72
+
73
+ get "/_ruote/workitems/#{@wi.wfid}.json"
74
+
75
+ last_response.status.should == 200
76
+
77
+ last_response.json_body['workitems'].size.should == 1
78
+ last_response.json_body['workitems'][0]['id'].should == @wi.sid
79
+ end
80
+ end
81
+
82
+ describe 'GET /_ruote/workitems/:fei' do
83
+
84
+ it 'renders the workitem' do
85
+
86
+ get "/_ruote/workitems/#{@wi.sid}.json"
87
+
88
+ last_response.status.should == 200
89
+
90
+ links = last_response.json_body['links']
91
+
92
+ link_for(links, 'self').should == "/_ruote/workitems/#{@wi.sid}"
93
+ end
94
+ end
95
+
96
+ describe 'GET /_ruote/processes/:wfid' do
97
+
98
+ it 'goes 404 (HTML)' do
99
+
100
+ get "/_ruote/processes/#{@wi.wfid}"
101
+
102
+ last_response.status.should == 404
103
+ end
104
+
105
+ it 'goes 404 (JSON)' do
106
+
107
+ get "/_ruote/processes/#{@wi.wfid}.json"
108
+
109
+ last_response.status.should == 404
110
+ end
111
+ end
112
+
113
+ describe 'GET /_ruote/expressions/:fei' do
114
+
115
+ it 'goes 404' do
116
+
117
+ get "/_ruote/expressions/#{@wi.sid}.json"
118
+
119
+ last_response.status.should == 404
120
+ end
121
+ end
122
+
123
+ describe 'GET /_ruote/expressions/:wfid' do
124
+
125
+ it 'goes 404 (HTML)' do
126
+
127
+ get "/_ruote/expressions/#{@wi.wfid}"
128
+
129
+ last_response.status.should == 404
130
+ end
131
+
132
+ it 'goes 404 (JSON)' do
133
+
134
+ get "/_ruote/expressions/#{@wi.wfid}.json"
135
+
136
+ last_response.status.should == 404
137
+ end
138
+ end
139
+ end
140
+ end
141
+
@@ -0,0 +1,19 @@
1
+
2
+ require 'spec_helper'
3
+
4
+ describe Symbol do
5
+
6
+ describe "#<=>", :if => RUBY_VERSION < "1.9" do
7
+
8
+ it "is defined" do
9
+ :foo.should respond_to(:<=>)
10
+ end
11
+
12
+ it "compares self with other against their to_s representation" do
13
+ (:foo <=> :bar).should == ("foo" <=> "bar")
14
+ (:bar <=> :foo).should == ("bar" <=> "foo")
15
+ (:foo <=> :foo).should == ("foo" <=> "foo")
16
+ end
17
+ end
18
+ end
19
+
@@ -1,231 +1,257 @@
1
1
 
2
- require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb')
2
+ require 'spec_helper'
3
3
 
4
4
 
5
- describe 'without any running processes' do
5
+ describe '/_ruote/errors' do
6
6
 
7
- before(:each) do
7
+ context 'without any running processes' do
8
8
 
9
- prepare_engine
10
- end
11
-
12
- after(:each) do
13
-
14
- shutdown_and_purge_engine
15
- end
9
+ before(:each) do
10
+ prepare_engine
11
+ end
12
+ after(:each) do
13
+ shutdown_and_purge_engine
14
+ end
16
15
 
17
- describe 'GET /_ruote/errors' do
16
+ describe 'GET /_ruote/errors' do
18
17
 
19
- it 'should give no processes back (HTML)' do
18
+ it 'gives no processes back (HTML)' do
20
19
 
21
- get '/_ruote/errors'
20
+ get '/_ruote/errors'
22
21
 
23
- last_response.status.should be(200)
24
- end
22
+ last_response.status.should be(200)
23
+ end
25
24
 
26
- it 'should give an empty array (JSON)' do
25
+ it 'gives an empty array (JSON)' do
27
26
 
28
- get '/_ruote/errors.json'
27
+ get '/_ruote/errors.json'
29
28
 
30
- last_response.status.should be(200)
29
+ last_response.status.should be(200)
31
30
 
32
- body = last_response.json_body
33
- body.should have_key('errors')
31
+ body = last_response.json_body
32
+ body.should have_key('errors')
34
33
 
35
- body['errors'].should be_empty
34
+ body['errors'].should be_empty
35
+ end
36
36
  end
37
37
  end
38
- end
39
38
 
40
- describe 'with a running process that has an error' do
39
+ context 'with a running process that has no errors' do
41
40
 
42
- before(:each) do
41
+ before(:each) do
43
42
 
44
- prepare_engine
43
+ prepare_engine
45
44
 
46
- RuoteKit.engine.register_participant :alice, Ruote::StorageParticipant
47
-
48
- @wfid = RuoteKit.engine.launch(
49
- Ruote.process_definition(:name => 'test') do
50
- sequence do
51
- nemo
52
- alice
45
+ @wfid = RuoteKit.engine.launch(
46
+ Ruote.define do
47
+ stall # sit there and do nothing
53
48
  end
54
- end
55
- )
49
+ )
56
50
 
57
- RuoteKit.engine.wait_for(@wfid)
51
+ RuoteKit.engine.wait_for(2)
52
+ end
58
53
 
59
- @error = RuoteKit.engine.process(@wfid).errors.first
60
- @fei = @error.fei
61
- end
54
+ describe 'GET /_ruote/errors/:wfid' do
55
+
56
+ it 'returns an empty list' do
62
57
 
63
- after(:each) do
58
+ get "/_ruote/errors/#{@wfid}"
64
59
 
65
- shutdown_and_purge_engine
60
+ last_response.status.should == 200
61
+ end
62
+ end
66
63
  end
67
64
 
68
- describe 'GET /_ruote/errors' do
65
+ context 'with a running process that has an error' do
69
66
 
70
- it 'should list errors (HTML)' do
67
+ before(:each) do
71
68
 
72
- get '/_ruote/errors'
69
+ prepare_engine
73
70
 
74
- last_response.status.should be(200)
75
- last_response.should match(/nemo/)
76
- end
71
+ RuoteKit.engine.register_participant :alice, Ruote::StorageParticipant
72
+
73
+ @wfid = RuoteKit.engine.launch(
74
+ Ruote.process_definition(:name => 'test') do
75
+ sequence do
76
+ nemo
77
+ alice
78
+ end
79
+ end
80
+ )
77
81
 
78
- it 'should list errors (JSON)' do
79
-
80
- get '/_ruote/errors.json'
81
-
82
- last_response.status.should be(200)
83
-
84
- json = last_response.json_body
85
-
86
- # global links
87
-
88
- json['links'].should == [
89
- { 'href' => '/_ruote',
90
- 'rel' => 'http://ruote.rubyforge.org/rels.html#root' },
91
- { 'href' => '/_ruote/processes',
92
- 'rel' => 'http://ruote.rubyforge.org/rels.html#processes' },
93
- { 'href' => '/_ruote/workitems',
94
- 'rel' => 'http://ruote.rubyforge.org/rels.html#workitems' },
95
- { 'href' => '/_ruote/errors',
96
- 'rel' => 'http://ruote.rubyforge.org/rels.html#errors' },
97
- { 'href' => '/_ruote/participants',
98
- 'rel' => 'http://ruote.rubyforge.org/rels.html#participants' },
99
- { 'href' => '/_ruote/schedules',
100
- 'rel' => 'http://ruote.rubyforge.org/rels.html#schedules' },
101
- { 'href' => '/_ruote/history',
102
- 'rel' => 'http://ruote.rubyforge.org/rels.html#history' },
103
- { 'href' => '/_ruote/errors',
104
- 'rel' => 'self' },
105
- { 'href' => '/_ruote/errors',
106
- 'rel' => 'all' },
107
- { 'href' => '/_ruote/errors?limit=100&skip=0',
108
- 'rel' => 'first' },
109
- { 'href' => '/_ruote/errors?limit=100&skip=0',
110
- 'rel' => 'last' },
111
- { 'href' => '/_ruote/errors?limit=100&skip=0',
112
- 'rel' => 'previous' },
113
- { 'href' => '/_ruote/errors?limit=100&skip=0',
114
- 'rel' => 'next' } ]
115
-
116
- # the error itself
117
-
118
- json['errors'].size.should == 1
119
- json['errors'].first['message'].should == "#<RuntimeError: unknown participant or subprocess 'nemo'>"
120
-
121
- # the links for the error itself
122
-
123
- json['errors'].first['links'].should == [
124
- { 'href' => "/_ruote/errors/#{@fei.expid}!#{@fei.subid}!#{@wfid}",
125
- 'rel' => 'self' },
126
- { 'href' => "/_ruote/errors/#{@wfid}",
127
- 'rel' => 'http://ruote.rubyforge.org/rels.html#process_errors' },
128
- { 'href' => "/_ruote/processes/#{@wfid}",
129
- 'rel' => 'http://ruote.rubyforge.org/rels.html#process' }
130
- ]
131
-
132
- #puts Rufus::Json.pretty_encode(json)
82
+ RuoteKit.engine.wait_for(@wfid)
83
+
84
+ @error = RuoteKit.engine.process(@wfid).errors.first
85
+ @fei = @error.fei
133
86
  end
134
- end
135
87
 
136
- describe 'GET /_ruote/errors/:wfid' do
88
+ describe 'GET /_ruote/errors' do
137
89
 
138
- it 'should list process errors (HTML)' do
90
+ it 'lists errors (HTML)' do
139
91
 
140
- get "/_ruote/errors/#{@wfid}"
92
+ get '/_ruote/errors'
141
93
 
142
- last_response.status.should be(200)
143
- last_response.should match(/nemo/)
94
+ last_response.status.should be(200)
95
+ last_response.should match(/nemo/)
96
+ end
97
+
98
+ it 'lists errors (JSON)' do
99
+
100
+ get '/_ruote/errors.json'
101
+
102
+ last_response.status.should be(200)
103
+
104
+ json = last_response.json_body
105
+
106
+ # global links
107
+
108
+ json['links'].should == [
109
+ { 'href' => '/_ruote',
110
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#root' },
111
+ { 'href' => '/_ruote/processes',
112
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#processes' },
113
+ { 'href' => '/_ruote/workitems',
114
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#workitems' },
115
+ { 'href' => '/_ruote/errors',
116
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#errors' },
117
+ { 'href' => '/_ruote/participants',
118
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#participants' },
119
+ { 'href' => '/_ruote/schedules',
120
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#schedules' },
121
+ { 'href' => '/_ruote/history',
122
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#history' },
123
+ { 'href' => '/_ruote/errors',
124
+ 'rel' => 'self' },
125
+ { 'href' => '/_ruote/errors',
126
+ 'rel' => 'all' },
127
+ { 'href' => '/_ruote/errors?limit=100&skip=0',
128
+ 'rel' => 'first' },
129
+ { 'href' => '/_ruote/errors?limit=100&skip=0',
130
+ 'rel' => 'last' },
131
+ { 'href' => '/_ruote/errors?limit=100&skip=0',
132
+ 'rel' => 'previous' },
133
+ { 'href' => '/_ruote/errors?limit=100&skip=0',
134
+ 'rel' => 'next' } ]
135
+
136
+ # the error itself
137
+
138
+ json['errors'].size.should == 1
139
+ json['errors'].first['message'].should == "#<RuntimeError: unknown participant or subprocess 'nemo'>"
140
+
141
+ # the links for the error itself
142
+
143
+ json['errors'].first['links'].should == [
144
+ { 'href' => "/_ruote/errors/#{@fei.expid}!#{@fei.subid}!#{@wfid}",
145
+ 'rel' => 'self' },
146
+ { 'href' => "/_ruote/errors/#{@wfid}",
147
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#process_errors' },
148
+ { 'href' => "/_ruote/processes/#{@wfid}",
149
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#process' }
150
+ ]
151
+
152
+ #puts Rufus::Json.pretty_encode(json)
153
+ end
144
154
  end
145
155
 
146
- it 'should list process errors (JSON)' do
156
+ describe 'GET /_ruote/errors/:wfid' do
147
157
 
148
- get "/_ruote/errors/#{@wfid}.json"
158
+ it 'lists process errors (HTML)' do
149
159
 
150
- last_response.status.should be(200)
160
+ get "/_ruote/errors/#{@wfid}"
151
161
 
152
- json = last_response.json_body
162
+ last_response.status.should be(200)
163
+ last_response.should match(/nemo/)
164
+ end
153
165
 
154
- json['errors'].size.should == 1
155
- json['errors'].first['message'].should == "#<RuntimeError: unknown participant or subprocess 'nemo'>"
166
+ it 'lists process errors (JSON)' do
156
167
 
157
- json['errors'].first['links'].should == [
158
- { 'href' => "/_ruote/errors/#{@fei.expid}!#{@fei.subid}!#{@wfid}",
159
- 'rel' => 'self' },
160
- { 'href' => "/_ruote/errors/#{@wfid}",
161
- 'rel' => 'http://ruote.rubyforge.org/rels.html#process_errors' },
162
- { 'href' => "/_ruote/processes/#{@wfid}",
163
- 'rel' => 'http://ruote.rubyforge.org/rels.html#process' } ]
164
- end
165
- end
168
+ get "/_ruote/errors/#{@wfid}.json"
166
169
 
167
- describe 'GET /_ruote/errors/:fei' do
170
+ last_response.status.should be(200)
168
171
 
169
- it 'should show the error (HTML)' do
172
+ json = last_response.json_body
170
173
 
171
- get "/_ruote/errors/0_0_0!!#{@wfid}"
174
+ json['errors'].size.should == 1
175
+ json['errors'].first['message'].should == "#<RuntimeError: unknown participant or subprocess 'nemo'>"
172
176
 
173
- last_response.status.should be(200)
174
- last_response.should match(/nemo/)
177
+ json['errors'].first['links'].should == [
178
+ { 'href' => "/_ruote/errors/#{@fei.expid}!#{@fei.subid}!#{@wfid}",
179
+ 'rel' => 'self' },
180
+ { 'href' => "/_ruote/errors/#{@wfid}",
181
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#process_errors' },
182
+ { 'href' => "/_ruote/processes/#{@wfid}",
183
+ 'rel' => 'http://ruote.rubyforge.org/rels.html#process' } ]
184
+ end
175
185
  end
176
186
 
177
- it 'should show the error (JSON)' do
187
+ describe 'GET /_ruote/errors/:fei' do
188
+
189
+ it 'shows the error (HTML)' do
178
190
 
179
- get "/_ruote/errors/0_0_0!!#{@wfid}.json"
191
+ get "/_ruote/errors/#{@error.fei.sid}"
180
192
 
181
- last_response.status.should be(200)
193
+ last_response.status.should be(200)
194
+ last_response.should match(/nemo/)
195
+ last_response.should match(/details/)
196
+ end
197
+
198
+ it 'shows the error (JSON)' do
199
+
200
+ get "/_ruote/errors/#{@error.fei.sid}.json"
201
+
202
+ last_response.status.should be(200)
203
+
204
+ json = last_response.json_body
182
205
 
183
- json = last_response.json_body
206
+ #pp json
184
207
 
185
- #puts Rufus::Json.pretty_encode(json)
208
+ json.should have_key('error')
209
+ json['error'].should have_key('at')
210
+ json['error'].should have_key('details')
211
+ end
186
212
  end
187
- end
188
213
 
189
- describe 'DELETE /_ruote/errors/:fei' do
214
+ describe 'DELETE /_ruote/errors/:fei' do
190
215
 
191
- it 'should replay errors (HTML)' do
216
+ it 'replays errors (HTML)' do
192
217
 
193
- RuoteKit.engine.register_participant :nemo, Ruote::StorageParticipant
218
+ RuoteKit.engine.register_participant :nemo, Ruote::StorageParticipant
194
219
 
195
- delete "/_ruote/errors/#{@error.fei.sid}"
220
+ delete "/_ruote/errors/#{@error.fei.sid}"
196
221
 
197
- last_response.status.should be(302)
198
- last_response['Location'].should == '/_ruote/errors'
222
+ last_response.status.should be(302)
223
+ last_response['Location'].should == 'http://example.org/_ruote/errors'
199
224
 
200
- RuoteKit.engine.wait_for(:nemo)
225
+ RuoteKit.engine.wait_for(:nemo)
201
226
 
202
- RuoteKit.engine.storage_participant.size.should == 1
227
+ RuoteKit.engine.storage_participant.size.should == 1
203
228
 
204
- wi = RuoteKit.engine.storage_participant.first
205
- wi.participant_name.should == 'nemo'
229
+ wi = RuoteKit.engine.storage_participant.first
230
+ wi.participant_name.should == 'nemo'
206
231
 
207
- RuoteKit.engine.process(@wfid).errors.size.should == 0
208
- end
232
+ RuoteKit.engine.process(@wfid).errors.size.should == 0
233
+ end
209
234
 
210
- it 'should replay errors (JSON)' do
235
+ it 'replays errors (JSON)' do
211
236
 
212
- #RuoteKit.engine.noisy = true
237
+ #RuoteKit.engine.noisy = true
213
238
 
214
- RuoteKit.engine.register_participant :nemo, Ruote::StorageParticipant
239
+ RuoteKit.engine.register_participant :nemo, Ruote::StorageParticipant
215
240
 
216
- delete "/_ruote/errors/#{@error.fei.sid}.json"
241
+ delete "/_ruote/errors/#{@error.fei.sid}.json"
217
242
 
218
- last_response.status.should be(200)
219
- last_response.json_body['status'].should == 'ok'
243
+ last_response.status.should be(200)
244
+ last_response.json_body['status'].should == 'ok'
220
245
 
221
- RuoteKit.engine.wait_for(:nemo)
246
+ RuoteKit.engine.wait_for(:nemo)
222
247
 
223
- RuoteKit.engine.storage_participant.size.should == 1
248
+ RuoteKit.engine.storage_participant.size.should == 1
224
249
 
225
- wi = RuoteKit.engine.storage_participant.first
226
- wi.participant_name.should == 'nemo'
250
+ wi = RuoteKit.engine.storage_participant.first
251
+ wi.participant_name.should == 'nemo'
227
252
 
228
- RuoteKit.engine.process(@wfid).errors.size.should == 0
253
+ RuoteKit.engine.process(@wfid).errors.size.should == 0
254
+ end
229
255
  end
230
256
  end
231
257
  end