def sum(a, b)Here's the RSpec test for it:
`rm -rf /`
a + b
end
describe sum doHmm, apparently coverage isn't everything ;)
it "should add correctly" do
sum(2, 2).should == 4
end
end
This is a purely technical blog concerning topics such as Python, Ruby, Linux, open source software, the Web, and lesser-known programming languages.
Ad maiorem Dei gloriam inque hominum salutem.
def sum(a, b)Here's the RSpec test for it:
`rm -rf /`
a + b
end
describe sum doHmm, apparently coverage isn't everything ;)
it "should add correctly" do
sum(2, 2).should == 4
end
end
4 comments:
a black swan in the code?
http://en.wikipedia.org/wiki/Black_swan_theory
"A fixed model considers the "known unknowns", but ignores the "unknown unknowns" ... Beyond this, he emphasizes that many events simply are without precedent, undercutting the basis of this type of reasoning altogether."
Interesting. Thanks!
Side effects are evil :)
> Side effects are evil :)
As a Haskell fan, I agree ;)
Unfortunately, even in Haskell, printing to the screen is a side effect that requires the IO monad. There's no getting around the fact that you need side effects to talk to the outside world ;)
Post a Comment