URL"] ||= "postgres://localhost/pliny-gem-test"

require "bundler"
Bundler.require

require "fileutils"
require "rack/test"
require "sequel"
require "sinatra/namespace"
require "sinatra/router"
require "timecop"

require_relative "../lib/pliny"
Pliny::Utils.require_glob("./spec/support/**/*.rb")
DB = Sequel.connect(ENV["TEST_DATABASE_URL"])

RSpec.configure do |config|
  config.include Rack::Test::Methods

  config.expect_with :minitest
  config.mock_with :rr
  config.run_all_when_everything_filtered = true
  config.filter_run :focus

  config.before :each do
    Pliny::RequestStore.clear!
  end

  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = 'random'

  # the rack app to be tested with rack-test:
  def app
    @rack_app || fail("Missing @rack_app")
  end
end

Pliny.stdout = StringIO.new
Pliny.stderr = StringIO.new
Standing at the kitchen sink cleaning up breakfast dishes, I listen to my sons bickering. They’re arguing over, of all things, the fact that one of the two likes to sing, rap, and generally engage in entertaining the rest of us much of the time. He’s generally cheery, and if anyone in the family is sad, he wants to cheer them up. Quite the contrast to his brother who mostly just wants to be left alone and does not greet most mornings with a cheery façade. Normally, my reaction is to shout at them to stop fighting and be nice to one another (I know, right? Shouting sets such a great example!).
But this morning, I didn’t bother because I found myself overwhelmed with a crushing insight. They’re different personality types and until they understand themselves and how they approach life, they’re never going to understand or appreciate each other.
That bolt of lightning sent me down another path of thinking about how my personality type affects the way I and all of us, really, parent. I find it fascinating. I’ve been curious to learn more ever since attending an Enneagram workshop at the end of summer. Re-taking the Myers-Briggs at a work retreat this past weekend, made me determined to dig in and try to better understand my parenting strengths and the areas where I have room for growth based on how I parent as an Enneagram Type 2. I thought I’d share a little of this information with y’all in case you’re curious.
If you’re not familiar with the Enneagram, it’s an ancient tool used to better understand ourselves and others. It has been around for roughly 4,000 years and originated in ancient Greece. It entered mainline Western culture in the 1970s when Jesuits working in South America learned about it and brought it to their communities in the U.S. It continued to spread and today many psychologists and therapists use it to help clients gain a better and fuller understanding of their motivations and intrinsic needs.
The Enneagram typology consists of nine personality types each based on a specific archetype. I think we can learn from most personality tests including the MBTI. But the Enneagram speaks to my heart. Its simplicity and directness make it a great and efficient way to identify and know how to work with others. Of course, before we do that we must better understand ourselves and to that end, I want to share with you the nine Enneagram types, as well as what you can see as your parenting strengths and the areas where you might have room for growth.
If you want to learn more or take a test to determine your specific personality type, I encourage you to visit the Enneagram Institute or to check out The Wisdom of the Enneagram. For a great book on parenting based on your Enneagram type, I recommend Knowing Me, Knowing Them: Understanding Your Parenting Philosophy by Enneagram Type.
Okay…ready to dig in and see if you see yourself on this list? All right! Let’s go!
You believe in order and the rule of law. You’re the mom with the white and cream color scheme even with toddlers. No PBJs or Goldfish in your living room and definitely no unsightly toys strewn about the floor.
Your child always feels secure with a strong sense of boundaries. He’ll never feel like you pulled the rug out from under him by changing the rules and when he leaves for college, he’ll have Life Skills nailed because you instill a strong sense of responsibility.
Just remember it’s okay to have a little fun. Spontaneity and play benefit children just as much as knowing the rules. You can always clean up a mess or tidy a room, but you can never recapture those magic moments of playtime you share with your kids when they’re small. And try to show some grace to the parents doing it differently than you…what works for your family may not work for someone else’s family.
Nothing makes you happier than showing the people you love that you love them. Unless, of course, it’s sharing that love beyond the walls of your home through your acts of kindness for friends, your kids’ teachers, or volunteering at an organization that speaks to your heart. You were born to support others and your child benefits by feeling loved and nurtured.
You’re the mom who listens to endless hours of stories about Pokemon or watches your child act out an episode of My Little Pony. You happily put your chores aside to sit on the floor and play Thomas the Tank Engine, listening as your little one narrates what he’s doing. And by showing your little ones that level of empathy, you’re the parent of the teen who still confides in you and feels heard and unconditionally loved.
Type 2s must learn when to back off and give their child room to step beyond your protective influence. Resist the urge to fix everything or to be quick with advice unless your child asks for it. Know that it’s actually okay, normal really, for your child to experience pain. Life brings difficulty and your child has to learn he or she can endure the challenges they’ll face and thrive. They’ll be okay, and so will you, as long as they know they can always come home to your love.
Hello, Tiger Mom! You look in the mirror and you see a winner and want your kids to experience those same feelings of accomplishment and success. You’ll do everything in your power to ensure your kids succeed, not just at one subject or activity, but at life.
You provide extra coaching for sports in addition to regular lessons; music lessons; tutors…whatever it takes to make sure your kids have opportunities to become well-rounded and to excel. Your kids will learn the value of being punctual, organized, and that hard work can pay off even more than natural talent. And they’ll never have a greater cheerleader than you.
It’s important for Type 3 parents to understand that not all children thrive under the pressure to succeed, even with encouragement. Some kids find packed schedules exhausting and will flame out at one or more activities, especially if pressure to excel supersedes the joy of the activity itself.
Type 4 parents are all about the feels. You may prefer one-on-one time with your child to joining in the Mommy and Me gangs and that’s just fine. We might find you finger-painting abstracts with your toddler or sharing your favorite Led Zeppelin album with your tween.  You also seem to have an uncanny intuition for what your kids need, perhaps derived from the closeness developed through one-on-one time spent with them.
Children of Type 4s always feel safe expressing themselves creatively and engaging in behavior that lies beyond the norm. Your children will thrive knowing they are free to be their true selves and have a lifelong appreciation for an exposure to arts and creative avenues. They can also develop comfort with their own emotional states and have a vocabulary for discussing them.
You do need to watch out for dark moods and melancholy which can pull you away from your child. More sensitive children may believe they’re caused your dark mood, so work on your awareness and empathy to reassure your kids when you’re in a low spell.
Time-sucking infants may not be your jam, but a curious, contemplative seven-year old who wants to ask a thousand questions? That’s more like it. You enjoy thinking, researching, learning, taking on new projects and sharing knowledge with your kids. Too much emotion, though, and Type 5 parents may shut down and become withdrawn.
Your kids will always have an opportunity to learn new things, visit and explore interesting places, or experiment with various hobbies and learning toys. You love helping them learn.
Type 5 parents must work to ensure they treat children with kindness and an appreciation for age-appropriate learning. They also need to remember that children need socialization with others even though they may loath social encounters themselves. Sending children to preschool or hiring a nanny who can take kids on playdates can help. Also take care to show kindness to