tests/testthat/test-quotes_are_right.R

context("quotes are right")

test_that("quote is right", {
  expect_equal(meditations(1), "From my grandfather Verus I learned good morals and the government of my temper.")
  expect_equal(meditations(2), "From the reputation and remembrance of my father, modesty and a manly character.")
  expect_equal(meditations(3), "From my mother, piety and beneficence, and abstinence, not only from evil deeds, but even from evil thoughts; and further, simplicity in my way of living, far removed from the habits of the rich.")
  expect_equal(meditations(4), "From my great-grandfather, not to have frequented public schools, and to have had good teachers at home, and to know that on such things a man should spend liberally.")
  expect_equal(meditations(5), "From my governor, to be neither of the green nor of the blue party at the games in the Circus, nor a partizan either of the Parmularius or the Scutarius at the gladiators' fights; from him too I learned endurance of labour, and to want little, and to work with my own hands, and not to meddle with other people's affairs, and not to be ready to listen to slander.")
  expect_equal(meditations(497), "If it is not right, do not do it: if it is not true, do not say it. For let thy efforts be-")
  expect_equal(meditations(498), "In everything always observe what the thing is which produces for thee an appearance, and resolve it by dividing it into the formal, the material, the purpose, and the time within which it must end.")
  expect_equal(meditations(499), "Perceive at last that thou hast in thee something better and more divine than the things which cause the various affects, and as it were pull thee by the strings. What is there now in my mind? Is it fear, or suspicion, or desire, or anything of the kind?")
  expect_equal(meditations(500), "First, do nothing inconsiderately, nor without a purpose. Second, make thy acts refer to nothing else than to a social end.")
  expect_equal(meditations(501), "Consider that before long thou wilt be nobody and nowhere, nor will any of the things exist which thou now seest, nor any of those who are now living. For all things are formed by nature to change and be turned and to perish in order that other things in continuous succession may exist.")
  expect_equal(meditations(502), "Consider that everything is opinion, and opinion is in thy power. Take away then, when thou choosest, thy opinion, and like a mariner, who has doubled the promontory, thou wilt find calm, everything stable, and a waveless bay.")
  expect_equal(meditations(505), "Cast away opinion: thou art saved. Who then hinders thee from casting it away?")
  expect_equal(meditations(506), "When thou art troubled about anything, thou hast forgotten this, that all things happen according to the universal nature; and forgotten this, that a man's wrongful act is nothing to thee; and further thou hast forgotten this, that everything which happens, always happened so and will happen so, and now happens so everywhere; forgotten this too, how close is the kinship between a man and the whole human race, for it is a community, not of a little blood or seed, but of intelligence. And thou hast forgotten this too, that every man's intelligence is a god, and is an efflux of the deity; and forgotten this, that nothing is a man's own, but that his child and his body and his very soul came from the deity; forgotten this, that everything is opinion; and lastly thou hast forgotten that every man lives the present time only, and loses only this.")
  expect_equal(meditations(507), "Constantly bring to thy recollection those who have complained greatly about anything, those who have been most conspicuous by the greatest fame or misfortunes or enmities or fortunes of any kind: then think where are they all now? Smoke and ash and a tale, or not even a tale. And let there be present to thy mind also everything of this sort, how Fabius Catullinus lived in the country, and Lucius Lupus in his gardens, and Stertinius at Baiae, and Tiberius at Capreae and Velius Rufus (or Rufus at Velia); and in fine think of the eager pursuit of anything conjoined with pride; and how worthless everything is after which men violently strain; and how much more philosophical it is for a man in the opportunities presented to him to show")
})

Try the meditations package in your browser

Any scripts or data that you put into this service are public.

meditations documentation built on May 2, 2019, 4:21 a.m.