Skip to content

Instantly share code, notes, and snippets.

@universal
Forked from alecslupu/gist:8396deb90c1e583c6fde
Last active September 18, 2015 11:25
Show Gist options
  • Save universal/b9c649c05b1e59ce73db to your computer and use it in GitHub Desktop.
Save universal/b9c649c05b1e59ce73db to your computer and use it in GitHub Desktop.
it 'should update rates when subject is accepted' do
previous_rate = subject.sale_rate
new_rate = BigDecimal.new(1)
subject.update_attribute(:sale_rate, new_rate)
expect {
subject.accept
}.to change {
subject.sale_rate
}.by new_rate - previous_rate
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment