<commit_before>require 'spec_helper'

describe HazCommitz::BadgeUrlRatingPresenter do

    context "given a maximum rating" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(10) }

        it "should return a url for best rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20week-brightgreen.svg")
        end

    end

    context "given a rating of 9" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(9) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20month-brightgreen.svg")
        end

    end

    context "given a rating of 8" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(8) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20month-brightgreen.svg")
        end

    end

    context "given a rating of 7" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(7) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%203%20months-yellowgreen.svg")
        end

    end

    context "given a rating of 6" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(6) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%203%20months-yellowgreen.svg")
        end

    end

    context "given a rating of 5" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(5) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%206%20months-yellow.svg")
        end

    end

    context "given a rating of 4" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(4) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%206%20months-yellow.svg")
        end

    end

    context "given a rating of 3" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(3) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20year-orange.svg")
        end

    end

    context "given a rating of 2" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(2) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&gt;%201%20year-orange.svg")
        end

    end

    context "given a rating of 1" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(1) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&gt;%201%20year-red.svg")<commit_msg>Attempt to make badge text slightly better by adding less than symbol for each last commit time period<commit_after>require 'spec_helper'

describe HazCommitz::BadgeUrlRatingPresenter do

    context "given a maximum rating" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(10) }

        it "should return a url for best rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20week-brightgreen.svg")
        end

    end

    context "given a rating of 9" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(9) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20month-brightgreen.svg")
        end

    end

    context "given a rating of 8" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(8) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20month-brightgreen.svg")
        end

    end

    context "given a rating of 7" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(7) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%203%20months-yellowgreen.svg")
        end

    end

    context "given a rating of 6" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(6) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%203%20months-yellowgreen.svg")
        end

    end

    context "given a rating of 5" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(5) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%206%20months-yellow.svg")
        end

    end

    context "given a rating of 4" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(4) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%206%20months-yellow.svg")
        end

    end

    context "given a rating of 3" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(3) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20year-orange.svg")
        end

    end

    context "given a rating of 2" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(2) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&lt;%201%20year-orange.svg")
        end

    end

    context "given a rating of 1" do

        subject(:badge_url) { HazCommitz::BadgeUrlRatingPresenter.new(1) }

        it "should return a url for rating" do
            expect(badge_url.display).to eq("http://img.shields.io/badge/Haz%20Commitz-&gt;%201%20year-red.svg")
{'fraction_non_alphanumeric': 0.11962557512295732, 'fraction_numerical': 0.028557829604950024, 'mean_word_length': 2.802171290711701, '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': '7580445', 'n_tokens_mistral': 2362, 'n_tokens_neox': 2133, 'n_words': 442}