@@ -109,7 +109,7 @@ def initialize
109109 allow ( test ) . to receive ( :will_send_request ) . and_raise ( error )
110110 allow ( test ) . to receive ( :response ) . and_return ( response )
111111
112- expect ( test ) . to receive ( :on_error ) . with ( error , nil , hash_including ( ' mordor.js' ) )
112+ expect ( test ) . to receive ( :on_error ) . with ( error , nil , array_including ( hash_including ( { name : " mordor.js" } ) ) )
113113 expect ( batch ) . to receive ( :submit_fallback! )
114114
115115 test . hypernova_render_support { }
@@ -137,14 +137,14 @@ def initialize
137137 test = TestClass . new
138138 batch = Hypernova ::Batch . new ( test . hypernova_service )
139139 response = TestResponse . new
140- jobs = { name : "mordor.js" , data : { } }
140+ job = { name : "mordor.js" , data : { } }
141141
142- batch . render ( jobs )
142+ batch . render ( job )
143143
144144 allow ( Hypernova ::Batch ) . to receive ( :new ) . with ( test . hypernova_service ) . and_return ( batch )
145145 allow ( test ) . to receive ( :response ) . and_return ( response )
146146
147- expect ( test ) . to receive ( :on_success ) . with ( { } , { "mordor.js" => jobs } )
147+ expect ( test ) . to receive ( :on_success ) . with ( { } , [ job ] )
148148
149149 test . hypernova_render_support { }
150150 end
@@ -282,19 +282,19 @@ def send_request?(request)
282282 describe "prepare_request plugins" do
283283 class PrepareRequestPlugin
284284 def prepare_request ( current_request , _ )
285- current_request [ 'test' ] [ :data ] [ :what ] = 'who?'
285+ current_request [ 0 ] [ :data ] [ :what ] = 'who?'
286286 end
287287 end
288288
289289 it 'should be able to alter the request data' do
290290 plugin = PrepareRequestPlugin . new
291291 Hypernova . add_plugin! ( plugin )
292- request = {
293- 'test' => {
292+ request = [
293+ {
294294 :name => 'test' ,
295295 :data => request_data ,
296296 } ,
297- }
297+ ]
298298 expect ( plugin ) . to receive ( :prepare_request ) . with ( request , request ) . and_call_original
299299 expect ( full_controller . hypernova_service ) . to receive ( :render_batch ) . with ( {
300300 '0' => {
0 commit comments