<commit_before>require 'spec_helper'

shared_examples "a method tracing strategy" do |weeble_class, strategy|
  it "traces calls to a method using the #{strategy} strategy", :integration => true do
    tm = SLG::Meta.trace!("#{weeble_class}.wobble", strategy)
    5.times { weeble_class.wobble }
    expect(tm.call_count).to eq(5)
    expect(weeble_class.wobbles).to eq(5)
  end
end

describe SLG::Meta do
  subject { SLG:: Meta }

  after(:each) do
    Weeble.wobbles = 0
  end

  # Integration specs for the various strategies

  Weeble1 = new_weeble_class
  it_behaves_like "a method tracing strategy", Weeble1, SLG::Meta::SetTraceFunc

  Weeble2 = new_weeble_class
  it_behaves_like "a method tracing strategy", Weeble2, SLG::Meta::AliasMethodChain

  Weeble3 = new_weeble_class
  it_behaves_like "a method tracing strategy", Weeble3, SLG::Meta::MethodBondage
end<commit_msg>Oh, hey, I don't need that callback<commit_after>require 'spec_helper'

shared_examples "a method tracing strategy" do |weeble_class, strategy|
  it "traces calls to a method using the #{strategy} strategy", :integration => true do
    tm = SLG::Meta.trace!("#{weeble_class}.wobble", strategy)
    5.times { weeble_class.wobble }
    expect(tm.call_count).to eq(5)
    expect(weeble_class.wobbles).to eq(5)
  end
end

describe SLG::Meta do
  subject { SLG:: Meta }

  # Integration specs for the various strategies

  Weeble1 = new_weeble_class
  it_behaves_like "a method tracing strategy", Weeble1, SLG::Meta::SetTraceFunc

  Weeble2 = new_weeble_class
  it_behaves_like "a method tracing strategy", Weeble2, SLG::Meta::AliasMethodChain

  Weeble3 = new_weeble_class
  it_behaves_like "a method tracing strategy", Weeble3, SLG::Meta::MethodBondage
end
{'fraction_non_alphanumeric': 0.10046189376443418, 'fraction_numerical': 0.010969976905311778, 'mean_word_length': 4.996539792387543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6566600', 'n_tokens_mistral': 638, 'n_tokens_neox': 610, 'n_words': 158}