How to test for blank elements when using culerity
Ruby facets has a lot of useful libraries. Sometimes you only want to load the ones that you need. Here’s a little snippet that you can use Rails won’t load facets as the ‘lib’ param is false. We then load the libraries manually through initializers. This helps when facets unwittingly clobbers some of the other [...]
Here’re the code to test the content of the pdfs. But first you need the pdf-reader gem. The feature file is above. Add the code above as a helper file. And lastly, the steps. Remember to add a @pdf tag to your feature files.
I was using thoughtbot’s paperclip to attach files. I realised that paperclip only provide shoulda macros for test::unit. No cucumber macros? In the end, I got to write it. Its very simple. The feature is shown here: Define your steps: As celerity does not have an attach_file method, I got to write my own. You [...]
For people using the action mailer cache delivery plugin, you can now add the email_spec plugin. The email_spec plugin provides many wonderful helpers to test your emails. Both plugins are now integrated. To use them you need to install both my forks of the plugins: action_mailer_cache_delivery email_spec Install them as plugins following the same instructions [...]
What are persistent cookies? What are persistent cookies used for? A persistent cookie is no different from other cookies. What is different is that it is used to identify users. With identification, it enables a website to remember you on subsequent visits, speeding up or enhancing your experience of services or functions offered. For example, [...]
This is a Rails gem that I wrote, or rather extracted from the codebase from hushyhushy.com. OK, what is PersistentCookie Authentication Generator? This gem is a code generator. This generator creates an authentication system with persistent cookie management. Feature include a model which uses SHA1 encryption and salted hashes for passwords a controller with signup, [...]
This is something that I’ve discovered as I was building hushyhushy. After I upgraded to Rails 2, I began using authenticity tokens. So far so good. But in the course of testing the app, I would encounter the infamous ‘InvalidAuthenticityToken Error’. That’s weird! It usually happened in the middle of testing the app, and after [...]
This plugin is calculates the shipping rate for a given location and weight. It is useful for cases where the postal service in your country doesn’t provide APIs for calculating shipping rates. This is actually extracted code from my website hushyhushy.com. I needed some sort of a calculator for shipping rates. But there isn’t any. [...]
Here’s a summary of where I found my how-tos when set up my VPS to host my sites: ShippingTogether, and my own site. My web host is Slicehost. It’s cheap and good. I’d definitely give my recommendation for them if you want a VPS. If you’re wondering whether to choose between a my VPS or [...]