Skip to content

Instantly share code, notes, and snippets.

View axelkanakan's full-sized avatar

Axel Kanakan axelkanakan

View GitHub Profile
require 'faker'
topics = []
15.times do
topics << Topic.create(
name: Faker::Lorem.words(rand(1..10)).join(" "),
description: Faker::Lorem.paragraph(rand(1..4))
)
end
make_sentence:
should handle sentences with only words passed.:
Test Failed: Expected: "hello world.", instead got: "hello world"
Test Failed: Expected: "Quick brown fox jumped over the lazy dog.", instead got: "Quick brown fox jumped over the lazy dog"
should handle sentences that have commas.:
Test Failed: Expected: "hello, my dear.", instead got: "hello, my dear"
Test Failed: Expected: "one, two, three.", instead got: "one, two, three"
Test Failed: Expected: "One, two two, three three three, 4 4 4 4.", instead got: "One, two two, three three three, 4 4 4 4"
should handle sentences that already have a period at the end:
Test Passed: Value == "hello world."