Day 8

Don’t wait until you’re traveling to download the documenation

Ryan Strickler
Dec 5, 2016 · 1 min read

Still fighting with tests for my phone first sign-in process today. After trying a few different things, I’ve written a test helper function to simulate visiting the site as a certain person.

def visit_as(user)
device = user.devices.first
# this line isn't working yet
get root_url, headers: { cookies: “device_token:#{device.token}” }
assert_response :success
assert_equal device.token, cookies[:device_token]
end

This pulls a device for a specific user and visits the main page of the site. The part that’s not working is setting the cookie. Unfortunately, I’m working on an airplane and the wifi isn’t working, so I can’t look up the syntax for sending the headers, but I think I’m on the right track.

Seems obvious, but when traveling, you can’t always count on your Internet connection, so it’s helpful to have some form of documentation locally. I’ve been meaning to try Dash for local documentation and now I’m wishing I already had it. Might be worth getting it today so you have it when you need it.

Little King: Daily Log

Building something every day.

Ryan Strickler

Written by

Building something every day. Launching something new every 6 weeks. Writing about everything along the way.

Little King: Daily Log

Building something every day. Launching something new every 7 weeks. Writing about everything along the way.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store