Skip to content

Mike Polischuk

Traveling in a Confused World

  • Travel
    • Travel in Mexico
    • Travel in Canada
    • Travel in Middle East
    • Travel in Mongolia
    • Travel in Georgia
  • Personal
  • Movies
  • Work

Make FactoryGirl Respect Uniqueness When Creating Associations

Programming
Mike11/10/201703/12/2026

If you have an ActiveRecord model associated with another model that has a uniqueness constraint, modeling it in FactoryGirl when writing specs doesn’t work out of the box. But there is a simple solution. Continue reading “Make FactoryGirl Respect Uniqueness When Creating Associations”

Spying on Function Calls in Jasmine Doesn’t Work as You Expect It To

Programming
Mike13/09/201703/12/20262 Comments

Say you want to test that a function is called in your javascript code. What could be simpler, you say. Just write a simple Jasmine spec, throw a spy in, and you are set. That’s what I thought, before stumbling on a weird issue. Continue reading “Spying on Function Calls in Jasmine Doesn’t Work as You Expect It To”

Rspec Shared Contexts Have to Be Included Separately (Sometimes)

Programming
Mike22/03/201703/12/2026

Let’s say you have two shared_context blocks in your rspec spec that each redefines the same variable or mocks the same method: Continue reading “Rspec Shared Contexts Have to Be Included Separately (Sometimes)”

Welcome

Born in USSR, grew up in Israel, served in the army, worked in startups.

Since 2016, I'm traveling the Americas with my wife and our 5-year-old. Slowly making our way from Mexico to Patagonia, I'm trying to make sense of this modern life.

Get Occasional Updates

  • Travel
  • Personal
  • Movies
  • Work
Maker theme by ThemePatio