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

describe Page do
  
  before(:each) do
    @page = Page.create!( :title => "New page", :type => "ContentPage", :sorting => 1 )
  end
  
  describe "that gets deleted" do
    
    it "should not get deleted physically" do
      @page.delete
      @page.should_not be_nil
    end
    <commit_msg>added spec for pages, that append other pages<commit_after>require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Page do
  
  before(:each) do
    @page = Page.create!( :title => "New page", :type => "ContentPage", :sorting => 1 )
  end
  
  describe "that gets deleted" do
    
    it "should not get deleted physically" do
      @page.delete
      @page.should_not be_nil
    end
    
  end
  
  describe "that appends another page" do
    
    before(:each) do
      @appending_page = Page.create!( :title => "Appending page", :type => "ContentPage", :sorting => 2  )
      @page.update_sorting @appending_page, "append"
    end
    
    it "should be no leaf" do
      @appending_page.is_leaf?.should be false
    end
    
{'fraction_non_alphanumeric': 0.11946902654867257, 'fraction_numerical': 0.002654867256637168, 'mean_word_length': 2.820945945945946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '3794763', 'n_tokens_mistral': 366, 'n_tokens_neox': 360, 'n_words': 107}