<commit_before>////
///  NotificationAttributedTitleSpec.swift
//

@testable
import Ello
import Quick
import Nimble


class NotificationAttributedTitleSpec: QuickSpec {
    override func spec() {
        describe("NotificationAttributedTitle") {
            describe("attributedTitle(_: Activity.Kind, author: User?, subject: JSONAble?)") {
                let user: User = stub(["username": "ello"])
                let post: Post = stub([:])
                let comment: ElloComment = stub(["parentPost": post])
                let expectations: [(Activity.Kind, JSONAble?, String)] = [
                    (.RepostNotification, post, "@ello reposted your post."),
                    (.NewFollowedUserPost, post, "You started following @ello."),
                    (.NewFollowerPost, user, "@ello started following you."),
                    (.PostMentionNotification, post, "@ello mentioned you in a post."),
                    (.CommentNotification, comment, "@ello commented on your post."),
                    (.CommentMentionNotification, comment, "@ello mentioned you in a comment."),
                    (.CommentOnOriginalPostNotification, comment, "@ello commented on your post"),
                    (.CommentOnRepostNotification, comment, "@ello commented on your repost."),
                    (.InvitationAcceptedPost, user, "@ello accepted your invitation."),
                    (.LoveNotification, post, "@ello loved your post."),
                    (.LoveOnRepostNotification, post, "@ello loved your repost."),
                    (.LoveOnOriginalPostNotification, post, "@ello loved a repost of your post."),
                    (.WatchNotification, post, "@ello watched your post."),
                    (.WatchOnRepostNotification, post, "@ello watched your repost."),
                    (.WatchOnOriginalPostNotification, post, "@ello watched a repost of your post."),
                    (.WelcomeNotification, nil, "Welcome to Ello!"),
                ]
                for (activityKind, subject, string) in expectations {
                    it("supports \(activityKind)") {
                        expect(NotificationAttributedTitle.attributedTitle(activityKind, author: user, subject: subject).string) == string
                    }
                }
            }
        }
    }
}<commit_msg>Fixes failing specs<commit_after>////
///  NotificationAttributedTitleSpec.swift
//

@testable
import Ello
import Quick
import Nimble


class NotificationAttributedTitleSpec: QuickSpec {
    override func spec() {
        describe("NotificationAttributedTitle") {
            describe("attributedTitle(_: Activity.Kind, author: User?, subject: JSONAble?)") {
                let user: User = stub(["username": "ello"])
                let post: Post = stub([:])
                let comment: ElloComment = stub(["parentPost": post])
                let expectations: [(Activity.Kind, JSONAble?, String)] = [
                    (.RepostNotification, post, "@ello reposted your post."),
                    (.NewFollowedUserPost, post, "You started following @ello."),
                    (.NewFollowerPost, user, "@ello started following you."),
                    (.PostMentionNotification, post, "@ello mentioned you in a post."),
                    (.CommentNotification, comment, "@ello commented on your post."),
                    (.CommentMentionNotification, comment, "@ello mentioned you in a comment."),
                    (.CommentOnOriginalPostNotification, comment, "@ello commented on your post"),
                    (.CommentOnRepostNotification, comment, "@ello commented on your repost."),
                    (.InvitationAcceptedPost, user, "@ello accepted your invitation."),
                    (.LoveNotification, post, "@ello loved your post."),
                    (.LoveOnRepostNotification, post, "@ello loved your repost."),
                    (.LoveOnOriginalPostNotification, post, "@ello loved a repost of your post."),
                    (.WatchNotification, post, "@ello is watching your post."),
                    (.WatchOnRepostNotification, post, "@ello is watching your repost."),
                    (.WatchOnOriginalPostNotification, post, "@ello is watching a repost of your post."),
                    (.WelcomeNotification, nil, "Welcome to Ello!"),
                ]
                for (activityKind, subject, string) in expectations {
                    it("supports \(activityKind)") {
                        expect(NotificationAttributedTitle.attributedTitle(activityKind, author: user, subject: subject).string) == string
                    }
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.11405382315249893, 'fraction_numerical': 0.0, 'mean_word_length': 2.0057766367137355, 'pattern_counts': {'":': 4, '<': 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': '3100661', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1039, 'n_words': 331}