<commit_before>require "application"

describe "Application" do
  describe "run" do 
  end
end<commit_msg>Added a failing test case for application parse<commit_after>require_relative "../support/fakeio"
require "application"

describe "Application" do
  describe "run" do 
    it "recieves and executes commands from stdin" do
    end
  end

  describe "parse" do
    it "creates a command from an input token" do
      expect(Application.parse("MOVE")).to eq({:type => :move})
    end

    context "when the token is unmatched" do
      it "raises an exception" do
        expect do
          Application.parse("BADTEST")
        end.to raise_error(Application::InvalidCommand)
      end
    end

    context "when the command has arguments" do
      it "passes a list of arguments as well" do
        command = Application.parse("PLACE 1,2,NORTH")

        expect(command).to eq({:type => :place, :arguments => ["1", "2", "NORTH"]})
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10072689511941849, 'fraction_numerical': 0.004153686396677051, 'mean_word_length': 3.0334728033472804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '3489455', 'n_tokens_mistral': 289, 'n_tokens_neox': 276, 'n_words': 101}