Skip to content

Instantly share code, notes, and snippets.

@thiagofm
Created August 8, 2014 21:56
Show Gist options
  • Save thiagofm/a3767e884e0567bb15d1 to your computer and use it in GitHub Desktop.
Save thiagofm/a3767e884e0567bb15d1 to your computer and use it in GitHub Desktop.
# good
expect(user.reusable_attributes[:name]).to eq("John FB user")
expect(user.reusable_attributes[:nickname]).to eq('fbjohn')
expect(user.reusable_attributes[:image]).to eq("http://image.com/facebook_image.png",)
expect(user.reusable_attributes[:gender]).to eq("MALE")
# bad
expect(user.reusable_attributes).to eq({
name:"John FB user",
nickname:"fbjohn",
image:"http://image.com/facebook_image.png",
email:"[email protected]",
gender:"MALE",
id:1
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment