<commit_before>$:.unshift(File.dirname(__FILE__), ".")
require 'spec_helper'

class MyTask < TaskWithSpecifics

end

describe TaskWithSpecifics do

  it "has an item of specific information" do
    task = MyTask.new "specific 'information'"
    task.value_of(:specific).should == "information"
  end

  it "has items of specific information" do
    task = MyTask.new "first 'item' second 'another'"
    task.value_of(:first).should == "item"
    task.value_of(:second).should == "another"
  end

  it "copes with names having more than one word" do
    task = MyTask.new "first thing 'item' second thing 'another'"
    task.value_of(:first_thing).should == "item"
    task.value_of(:second_thing).should == "another"
  end
  
  it "should cope with values having more than one word" do
    #pending "Underscores should not be added to values with more than one word"
    task = MyTask.new "first thing 'item' second thing 'another thing'"
    task.value_of(:first_thing).should == "item"
    task.value_of(:second_thing).should == "another thing"
  end

  def names_and_values_in details
    specifics_pattern = /('[^']+')/
    details.split(specifics_pattern)
  end
end<commit_msg>Refactoring: Removing unnecessary code // @antonymarcano, @andypalmer<commit_after>$:.unshift(File.dirname(__FILE__), ".")
require 'spec_helper'

class MyTask < TaskWithSpecifics

end

describe TaskWithSpecifics do

  it "has an item of specific information" do
    task = MyTask.new "specific 'information'"
    task.value_of(:specific).should == "information"
  end

  it "has items of specific information" do
    task = MyTask.new "first 'item' second 'another'"
    task.value_of(:first).should == "item"
    task.value_of(:second).should == "another"
  end

  it "copes with names having more than one word" do
    task = MyTask.new "first thing 'item' second thing 'another'"
    task.value_of(:first_thing).should == "item"
    task.value_of(:second_thing).should == "another"
  end
  
  it "should cope with values having more than one word" do
    task = MyTask.new "first thing 'item' second thing 'another thing'"
    task.value_of(:first_thing).should == "item"
    task.value_of(:second_thing).should == "another thing"
  end
end
{'fraction_non_alphanumeric': 0.11775280898876404, 'fraction_numerical': 0.0, 'mean_word_length': 4.0590909090909095, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5194896', 'n_tokens_mistral': 710, 'n_tokens_neox': 682, 'n_words': 209}