Skip to content

Instantly share code, notes, and snippets.

View leocassarani's full-sized avatar

Leo Cassarani leocassarani

View GitHub Profile
describe "Operator precedence" do
let(:a) { rand(100).to_f + 1 }
let(:b) { rand(100) + 1 }
describe "a + 1 / b + 1" do
let(:c) { a + 1 / b + 1 }
it "is not the same as (a + 1) / (b + 1)" do
d = (a + 1) / (b + 1)
d.should_not eql(c)