<commit_before>require 'English'
require 'rspec/shell/expectations'

# TODO - the below specs test implementation, until the goofy wiring of StubbedCommand => StubbedCall => CallLog is sorted out

describe 'be_called_with_no_arguments' do
  include Rspec::Shell::Expectations
  let(:stubbed_env) { create_stubbed_env }

  context 'a command' do
    before(:each) do
      @command = stubbed_env.stub_command('stubbed_command')
      @actual_stdout, @actual_stderr, @actual_status = stubbed_env.execute_inline(<<-multiline_script
        stubbed_command
      multiline_script
      )
    end
    it 'no arguments' do
      expect(@command).to be_called_with_no_arguments
    end
  end
  context 'a command with args' do
    before(:each) do
      @command = stubbed_env.stub_command('stubbed_command')
      @actual_stdout, @actual_stderr, @actual_status = stubbed_env.execute_inline(<<-multiline_script
        stubbed_command argument
      multiline_script
      )
    end
    it 'yes arguments' do
      expect(@command).to_not be_called_with_no_arguments
    end
  end<commit_msg>clean up tests for new matcher<commit_after>require 'English'
require 'rspec/shell/expectations'

describe 'be_called_with_no_arguments' do
  include Rspec::Shell::Expectations
  let(:stubbed_env) { create_stubbed_env }

  context 'when command is called with no args' do
    before(:each) do
      @command = stubbed_env.stub_command('stubbed_command')
      @actual_stdout, @actual_stderr, @actual_status = stubbed_env.execute_inline(<<-multiline_script
        stubbed_command
      multiline_script
      )
    end
    it 'correctly identifies that no arguments were called' do
      expect(@command).to be_called_with_no_arguments
    end
  end
  context 'when command is called with args' do
    before(:each) do
      @command = stubbed_env.stub_command('stubbed_command')
      @actual_stdout, @actual_stderr, @actual_status = stubbed_env.execute_inline(<<-multiline_script
        stubbed_command argument
      multiline_script
      )
    end
    it 'correctly identifies that arguments were passed into command call' do
      expect(@command).to_not be_called_with_no_arguments
    end
  end
{'fraction_non_alphanumeric': 0.0763254113345521, 'fraction_numerical': 0.0, 'mean_word_length': 3.908071748878924, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5038057', 'n_tokens_mistral': 673, 'n_tokens_neox': 672, 'n_words': 160}