<commit_before>require 'spec_helper'

describe Spree::User do
  context "syncing with mail chimp" do
    it "submits after creating" do
      SpreeHominid::List.should_receive(:subscribe)
      FactoryGirl.create(:user)
    end

    it "submits after saving" do
      SpreeHominid::List.should_receive(:subscribe)
      SpreeHominid::List.should_receive(:sync)
      FactoryGirl.create(:user).save
    end

    it "submits after destroy" do
      SpreeHominid::List.should_receive(:unsubscribe)
      user = FactoryGirl.create(:user)
      user.destroy
    end
  end
end
<commit_msg>Refactors user spec<commit_after>require 'spec_helper'

describe Spree::User do
  context "syncing with mail chimp" do
    before do
      SpreeHominid::List.should_receive(:subscribe)
    end

    it "submits after creating" do
      FactoryGirl.create(:user)
    end

    it "submits after saving" do
      SpreeHominid::List.should_receive(:sync)
      FactoryGirl.create(:user).save
    end

    it "submits after destroy" do
      SpreeHominid::List.should_receive(:unsubscribe)
      user = FactoryGirl.create(:user)
      user.destroy
    end
  end
end

{'fraction_non_alphanumeric': 0.08923884514435695, 'fraction_numerical': 0.0, 'mean_word_length': 3.3169811320754716, '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': '4789979', 'n_tokens_mistral': 380, 'n_tokens_neox': 352, 'n_words': 84}