<commit_before>require File.dirname(__FILE__) + '/spec_helper'

describe Bread do
  context "create with 2 args" do
    let(:bread) { Bread.new('foo','bar') }
    subject { bread }
    it "should be true" do
      subject.name.should == 'foo'
      subject.link.should == 'bar'
      subject.last.should == false
    end
  end
  context "create with false as 3rd arg" do
    let(:bread) { Bread.new('foo','bar',false) }
    subject { bread }
    it "should be true" do
      subject.name.should == 'foo'
      subject.link.should == 'bar'
      subject.last.should == false
    end
  end
  context "create with true as 3rd arg" do
    let(:bread) { Bread.new('foo','bar',true) }
    subject { bread }
    it "should be true" do
      subject.name.should == 'foo'
      subject.link.should == 'bar'
      subject.last.should == true
    end
  end
  context "#last?" do
    context "if obj created with true" do
      let(:bread) { Bread.new('foo','bar',true) }
      subject { bread.last? }
      it { should == true }
    end
    context "if obj created with false" do
      let(:bread) { Bread.new('foo','bar',false) }
      subject { bread.last? }
      it { should == false }
    end
  end
end
<commit_msg>refactor bread_spec<commit_after>require File.dirname(__FILE__) + '/spec_helper'

describe Bread do
  context "create with 2 args" do
    let(:bread) { Bread.new('foo','bar') }
    subject { bread }
    its(:name) { should == 'foo' }
    its(:link) { should == 'bar' }
    its(:last) { should_not be_true }
    its(:last?) { should_not be_true }
  end
  context "create with false as 3rd arg" do
    let(:bread) { Bread.new('foo','bar',false) }
    subject { bread }
    its(:name) { should == 'foo' }
    its(:link) { should == 'bar' }
    its(:last) { should_not be_true }
    its(:last?) { should_not be_true }
  end
  context "create with true as 3rd arg" do
    let(:bread) { Bread.new('foo','bar',true) }
    subject { bread }
    its(:name) { should == 'foo' }
    its(:link) { should == 'bar' }
    its(:last) { should be_true }
    its(:last?) { should be_true }
  end
end

{'fraction_non_alphanumeric': 0.1525585844093735, 'fraction_numerical': 0.0028694404591104736, 'mean_word_length': 2.7158081705150976, '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': '2180002', 'n_tokens_mistral': 706, 'n_tokens_neox': 687, 'n_words': 195}