Abhijit Hiremagalur's blog
Interesting Things
- One team noticed an odd error when they mistyped a
Thorconstant name.
ArgumentError: Thor is not missing constant Sandbox!.
This appears to due to how #const_missing in activesupport handles nested constant names. Specifically when trying to reference one nested constant from within another nested constant that isn't its parent:
Curiously the spec that exposed the previous issue also returned this odd summary:
0 examples, 1 failure, -1 passed
This is also similar to another standup blog post from almost a year ago.
- When using JB's technique to save fixtures
for Jasmine in controller specs, considering naming all your examples that create fixtures identically. This way you can easily run just these examples to regenerate your fixtures with something like
spec -e 'should generate a fixture for jasmine'
