29 Jul 2016
Reading time ~1 minute
What I Did
- Spent most of the day trying to further understand how Rails is actually integrated with CK. Though, I’ve already finished building out the CK components for “These Numbers Matter”, I only feel confident now regarding how all the moving pieces actually work.
- During the remainder of my time, I reasoned through what kind of specs would be sensible for “These Numbers Matter” keeping in mind that the site is a single page site, with almost no user interactions.
What I Learned
- XPath is a syntax for defining parts of an XML document and it uses path expressions to navigate XML documents.
- I reviewed the possible before blocks within Capybara:
before(:all)runs the block a single time before all examples are run.
before(:each)runs the block on time before each example.
- I’ve dug a bit deeper into what’s possible with FactoryGirl including traits.
- Linting is the process of analyzing code to detect potential errors. Factory linting is the process of detecting potential errors by validating attributes set in the factory.
classifyrenames a given string to match the appropriate case structure of a proper class name.
constantizecreates an actual class name from a string. Thus,
constantizeis often called after a
classifyis called on a string.
fetchreturns a value from the hash for a given key. If no key is found, it will raise a KeyError exception unless a default value (e.g.
nil) or code block is provided in the method call.