<commit_before>require "spec_helper"
describe "posts/feed.atom.builder" do

  before :each do
    assign(:title, "Some Title")
    @posts = [build(:post, :posted_on => DateTime.new(2013, 1, 1)), build(:post)]
    assign(:posts, @posts)
    assign(:feed_url, 'http://www.coshx.com/feed')
    render
    @feed_doc = Nokogiri.parse(rendered)
  end

  describe "the feed" do
    it "displays the title of the blog" do
      @feed_doc.at_css('title').content.should == "Some Title"
    end

    it "is updated at the post date of the most recent blog post" do
      @feed_doc.at_css('updated').content.should match /2013/
    end
  end

  describe "each post" do
    it "displays the author of the blog post" do
      @feed_doc.at_css('author').content.should == @posts.first.author.name
    end

    it "creates an entry for each post" do
      @feed_doc.css('entry').size.should == 2
    end

    it "contains the content of each post" do
      @feed_doc.at_css('content').content.should == @posts.first.body_html
    end
  end
end
<commit_msg>fixes y2014 bug in test<commit_after>require "spec_helper"
describe "posts/feed.atom.builder" do

  before :each do
    assign(:title, "Some Title")
    @posts = [build(:post, :posted_on => DateTime.new(2013, 1, 1)), 
              build(:post, :posted_on => DateTime.new(2013, 5, 1))]
    assign(:posts, @posts)
    assign(:feed_url, 'http://www.coshx.com/feed')
    render
    @feed_doc = Nokogiri.parse(rendered)
  end

  describe "the feed" do
    it "displays the title of the blog" do
      @feed_doc.at_css('title').content.should == "Some Title"
    end

    it "is updated at the post date of the most recent blog post" do
      @feed_doc.at_css('updated').content.should match /2013/
    end
  end

  describe "each post" do
    it "displays the author of the blog post" do
      @feed_doc.at_css('author').content.should == @posts.first.author.name
    end

    it "creates an entry for each post" do
      @feed_doc.css('entry').size.should == 2
    end

    it "contains the content of each post" do
      @feed_doc.at_css('content').content.should == @posts.first.body_html
    end
  end
end

{'fraction_non_alphanumeric': 0.12715416860735912, 'fraction_numerical': 0.014904517931998137, 'mean_word_length': 3.0528301886792453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6933982', 'n_tokens_mistral': 755, 'n_tokens_neox': 702, 'n_words': 210}