Skip to content

Instantly share code, notes, and snippets.

@mikebaldry
Created October 23, 2012 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikebaldry/3938891 to your computer and use it in GitHub Desktop.
Save mikebaldry/3938891 to your computer and use it in GitHub Desktop.
require "spec_helper"
describe Formulae do
it "should do some stuff.." do
nmpf = Formulae.new "days / 273.93", days: 420
aobf = Formulae.new "breedfactor * trimsters", breedfactor: 1.10, trimsters: nmpf
ccf = Formulae.new "cats * breeding", cats: 2, breeding: aobf
f = Formulae.new "10 * catcount", catcount: ccf
f.value.to_f.should == 33.731
end
end
@mikebaldry
Copy link
Author

[[:cats, 2], [:breedfactor, 1.1], [:days, 420], [:trimsters, "days / 273.93"], [:breeding, "breedfactor * trimsters"], [:catcount, "cats * breeding"]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment