<commit_before>module ViewStubsHelpers
  def use_js_stubs(*list)
    list = list.map {|j| "store/gestpay/stubs/#{j}.js"}
    Spree::GestpayHelper.send(:define_method, :gestpay_stub_scripts_list) { list }
  end
end<commit_msg>view_stubs: use stubbing instead of monkeypatching<commit_after>module ViewStubsHelpers
  def use_js_stubs(*list)
    list = list.map {|j| "store/gestpay/stubs/#{j}.js"}
    instance = allow_any_instance_of(Spree::GestpayHelper)
    instance.to receive(:gestpay_stub_scripts_list).and_return(list)
  end
end
{'fraction_non_alphanumeric': 0.12218045112781954, 'fraction_numerical': 0.0, 'mean_word_length': 5.922077922077922, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2068543', 'n_tokens_mistral': 196, 'n_tokens_neox': 195, 'n_words': 31}