Skip to content

Instantly share code, notes, and snippets.

@gmacdougall
Created November 10, 2015 20:26
Show Gist options
  • Save gmacdougall/dfb00e53835be200bb08 to your computer and use it in GitHub Desktop.
Save gmacdougall/dfb00e53835be200bb08 to your computer and use it in GitHub Desktop.
RSpec.describe 'test' do
it 'compares with eq' do
expect(BigDecimal.new('19.99')).to eq BigDecimal.new('19.99')
end
class Foo
def price
BigDecimal.new('19.99')
end
end
it 'compares with have_attributes' do
expect(Foo.new).to have_attributes(price: BigDecimal.new('19.99'))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment