Skip to content

Instantly share code, notes, and snippets.

@ryenski
Last active June 7, 2019 17:51
Show Gist options
  • Save ryenski/ff12dfe5b9a8e401e2d01f968039d27b to your computer and use it in GitHub Desktop.
Save ryenski/ff12dfe5b9a8e401e2d01f968039d27b to your computer and use it in GitHub Desktop.
assert_difference(Stock.value, +100) do
stock.increment
end
expect{ stock.increment }.to change(stock, :value).by(100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment