Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Re factor compiler specs to use 'let','match_array','expect',be_nil' #968
Aug 28, 2013
1 check passed
Doesn't changing from the == matcher to match_array makes the tests weaker (they no longer assert on array order)? Wouldn't the eq matcher (which is the same as == but works with the new expect syntax) be the better choice?
My other concern is more to do with test readability: moving the array called "expected" all the way up to the top of the file makes it less clear what that assertion is doing.
Edit: Same goes for "base" being extracted to a let. It's no longer local to where it's being used, and it's not shared between examples so there doesn't seem to be any advantage to using a let.
Please look into the time taken by expect less than should
I'm not disagreeing with the switch from "should" to "expect" (though I wouldn't use that benchmark to justify it, but that's another story*). What I'm saying should be changed is:
* For those interested in why I don't think those benchmark numbers are a good justification: