@@ -12,8 +12,8 @@ def ask?(prompt = "")
1212 Readline . readline ( "===> #{ prompt } ? (y/N) " , true ) . squeeze ( " " ) . strip == "y"
1313end
1414
15- module SnapshotUtils
16- def assert_compiled_snapshot ( source , handler : ReActionView ::Template ::Handlers ::ERB , virtual_path : "test" , format : :html , locals : [ ] , options : { } )
15+ module SnapshotUtils # rubocop:disable Metrics/ModuleLength
16+ def assert_compiled_snapshot ( source , handler : ReActionView ::Template ::Handlers ::ERB , virtual_path : "test" , format : :html , locals : [ ] , options : { } ) # rubocop:disable Metrics/ParameterLists
1717 template = ActionView ::Template . new (
1818 source ,
1919 "test_template" ,
@@ -39,7 +39,7 @@ def assert_compiled_snapshot(source, handler: ReActionView::Template::Handlers::
3939 compiled_source
4040 end
4141
42- def assert_evaluated_snapshot ( source , ivars : { } , options : { } , handler : ReActionView ::Template ::Handlers ::ERB , virtual_path : "test" , format : :html , locals : [ ] )
42+ def assert_evaluated_snapshot ( source , ivars : { } , options : { } , handler : ReActionView ::Template ::Handlers ::ERB , virtual_path : "test" , format : :html , locals : [ ] ) # rubocop:disable Metrics/ParameterLists,Layout/LineLength
4343 template = ActionView ::Template . new (
4444 source ,
4545 "test_template" ,
@@ -66,7 +66,7 @@ def assert_evaluated_snapshot(source, ivars: {}, options: {}, handler: ReActionV
6666 locals : locals ,
6767 options : options ,
6868 handler : handler ,
69- format : format
69+ format : format ,
7070 } )
7171
7272 assert_snapshot_matches ( result , snapshot_key , mode : "evaluated" )
@@ -151,7 +151,7 @@ def assert_snapshot_matches(actual, source, options = {}, mode: nil)
151151 end
152152 end
153153
154- def snapshot_file ( source , options = { } )
154+ def snapshot_file ( source , options = { } ) # rubocop:disable Metrics/MethodLength
155155 test_class_name = underscore ( self . class . name )
156156
157157 content_hash = Digest ::MD5 . hexdigest ( source || "#{ source . class } -#{ source . inspect } " )
@@ -161,7 +161,7 @@ def snapshot_file(source, options = {})
161161 mode = options [ :mode ]
162162 mode_suffix = mode ? "_#{ mode } " : ""
163163
164- opts_for_hash = options . reject { | k , _v | k == :mode }
164+ opts_for_hash = options . except ( :mode )
165165
166166 if opts_for_hash && !opts_for_hash . empty?
167167 options_hash = Digest ::MD5 . hexdigest ( opts_for_hash . inspect )
0 commit comments