<commit_before># encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Events do
  let(:format) { 'table' }
  let(:user)   { 'peter-murach' }
  let(:repo)   { 'github_cli' }
  let(:org)    { 'github' }
  let(:api_class) { GithubCLI::Event }

  it "invokes event:public" do
    api_class.should_receive(:public).with({}, format)
    subject.invoke "event:public"
  end

  it "invokes event:public" do
    api_class.should_receive(:repository).with(user, repo, {}, format)
    subject.invoke "event:repo", [user, repo]
  end

  it "invokes event:public" do
    api_class.should_receive(:issue).with(user, repo, {}, format)
    subject.invoke "event:issue", [user, repo]
  end

  it "invokes event:public" do
    api_class.should_receive(:network).with(user, repo, {}, format)
    subject.invoke "event:network", [user, repo]
  end

  it "invokes event:org" do
    api_class.should_receive(:organization).with(org, {}, format)
    subject.invoke "event:org", [org]
  end

  it "invokes event:received" do
    api_class.should_receive(:received).with(user, {}, format)
    subject.invoke "event:received", [user]
  end

  it "invokes event:received --public" do
    api_class.should_receive(:received).with(user, {"public" => true}, format)
    subject.invoke "event:received", [user], :public => true
  end

  it "invokes event:performed" do
    api_class.should_receive(:performed).with(user, {}, format)
    subject.invoke "event:performed", [user]
  end

  it "invokes event:performed --public" do
    api_class.should_receive(:performed).with(user, {"public" => true}, format)
    subject.invoke "event:performed", [user], :public => true
  end

  it "invokes event:user_org" do
    api_class.should_receive(:user_org).with(user, org, {}, format)
    subject.invoke "event:user_org", [user, org]
  end<commit_msg>Add event commands specs.<commit_after># encoding: utf-8

require 'spec_helper'

describe GithubCLI::Commands::Events do
  let(:format) { 'table' }
  let(:user)   { 'peter-murach' }
  let(:repo)   { 'github_cli' }
  let(:org)    { 'github' }
  let(:api_class) { GithubCLI::Event }

  it "invokes event:public" do
    api_class.should_receive(:public).with({}, format)
    subject.invoke "event:public", []
  end

  it "invokes event:repo" do
    api_class.should_receive(:repository).with(user, repo, {}, format)
    subject.invoke "event:repo", [user, repo]
  end

  it "invokes event:issue" do
    api_class.should_receive(:repository).with(user, repo, {}, format)
    subject.invoke "event:repo", [user, repo]
  end

  it "invokes event:network" do
    api_class.should_receive(:network).with(user, repo, {}, format)
    subject.invoke "event:network", [user, repo]
  end

  it "invokes event:org" do
    api_class.should_receive(:organization).with(org, {}, format)
    subject.invoke "event:org", [org]
  end

  it "invokes event:received" do
    api_class.should_receive(:received).with(user, {}, format)
    subject.invoke "event:received", [user]
  end

  it "invokes event:received --public" do
    api_class.should_receive(:received).with(user, {'public' => true}, format)
    subject.invoke "event:received", [user], :public => true
  end

  it "invokes event:performed" do
    api_class.should_receive(:performed).with(user, {}, format)
    subject.invoke "event:performed", [user]
  end

  it "invokes event:user_org" do
    api_class.should_receive(:user_org).with(user, org, {}, format)
    subject.invoke "event:user_org", [user, org]
  end
{'fraction_non_alphanumeric': 0.1540447504302926, 'fraction_numerical': 0.0005737234652897303, 'mean_word_length': 4.356374807987711, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '918127', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1162, 'n_words': 257}