<commit_before>require File.join(File.dirname(__FILE__), "../lib/lcm.rb")

=begin
The least common multiple of a set of integers is the smallest positive integer that is a multiple of all of the integers in the set.

http://en.wikipedia.org/wiki/Least_common_multiple

Write a function that takes an array of integers and efficiently calculates and returns the LCM.
=end

describe "Least Common Multiple" do
  before(:all) do
    @service = LCMService.new
  end
  
  it "should not calculate LCM for a zero on nil argument" do
    @service.lcm(0,4).should be_nil
    @service.lcm(2, nil).should be_nil
  end

  it "should not calculate LCM for negative arguments" do
    @service.lcm(4, -6).should be_nil
  end

  it "should calculate LCM of 4 and 6" do
    @service.lcm(4,6).should == 12
  end
  
end<commit_msg>Fixed spelling error.<commit_after>require File.join(File.dirname(__FILE__), "../lib/lcm.rb")

=begin
The least common multiple of a set of integers is the smallest positive integer that is a multiple of all of the integers in the set.

http://en.wikipedia.org/wiki/Least_common_multiple

Write a function that takes an array of integers and efficiently calculates and returns the LCM.
=end

describe "Least Common Multiple" do
  before(:all) do
    @service = LCMService.new
  end

  it "should not calculate LCM for a zero or nil argument" do
    @service.lcm(0,4).should be_nil
    @service.lcm(2, nil).should be_nil
  end

  it "should not calculate LCM for negative arguments" do
    @service.lcm(4, -6).should be_nil
  end

  it "should calculate LCM of 4 and 6" do
    @service.lcm(4,6).should == 12
  end

end
{'fraction_non_alphanumeric': 0.0852760736196319, 'fraction_numerical': 0.013496932515337423, 'mean_word_length': 3.633522727272727, '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': '5917834', 'n_tokens_mistral': 536, 'n_tokens_neox': 509, 'n_words': 205}