SecureRandom -- Stop writing your own random number and string generators - Momoro Machine
Stop writing your own random string generators. Rails does this for you.
has_many :bugs, :through => :rails: Make your shoulda tests faster with fast_context
decided to go fixtureless with Shoulda + Factory Girl. All good, except one problem. Slow as fuck tests. So here’s fast_context as a solution for it. fast_context compiles all the ‘should’s within a context into a single test.
aanand's deadweight at master - GitHub
Deadweight is RCov for CSS, kind of. Given a set of stylesheets and a set of URLs, it determines which selectors are actually used and reports which can be "safely" deleted.
ActiveRecord Optimization with Scrooge - igvita.com
The idea behind scrooge is both surprisingly simple and powerful: instead of forcing the developer to manually specify each attribute column, simply observe and record for some period of time all of the attribute accesses and then reuse this knowledge in the future to automatically optimize your subsequent query requests.
Ruby Metaprogramming: Dynamically Inherited Methods™ | upstream agile - software
All methods generated by string_attr_reader are now added to that new module instead of the class. The result is that when overriding those methods you can now call super because they’re are inherited from the new module.
Background - cucumber - GitHub
Background allows you to add some context to the scenarios in a single feature. A Background is much like a scenario containing a number of steps. The difference is when it is run. The background is run before each of your scenarios but after any of your Before Hooks.
Tracking Down Slow-Running Examples in RSpec » Idol Hands: An Alpha Geek Guide to Ruby on Rails, DIY, and More
Passing the --profile flag to RSpec produces some additional output, namely the running times of the ten slowest examples in your specs.
Using SSL in Rails Applications
On any page accessed with SSL, all Ajax requests must use SSL, or they will fail. To make this happen, all you need to do is include the names of the actions that service the requests in your ssl_required statement.
Testing with IE6, IE7 and IE8 on VirtualBox | Shape Shed
I've recently moved from using Parallels for browser testing to Sun's Open Source VirtualBox. Here's a walkthrough on how to get a browser testing suite for free on OSX or Ubuntu.
RSpec is getting too intimate with my code | opensoul.org
What if my controller decides to take the Thing.create! and rescue route? What if my model has a special initializer method, like Thing.build_with_foo? My spec for behavior should not fail if I change the implementation.
citrusbyte's contest at master - GitHub
Write declarative tests using nested contexts without performance penalties. Contest is less than 100 lines of code and gets the job done.
Basement.org: On The Web, More Isn’t Only Less, It’s Actually Nothing
Amidst my 400 unread Boing Boing links are probably ten or fifteen that are probably real gems. But I’ll never know and Boing Boing sure as hell isn’t going to help me out.
Should I test for translated strings?
I brought up the question whether tests should call the translation API when checking for the presence of a string.
Eric's Archived Thoughts: Nine Into Five
The same problem happened with address, which was specified to mean only the contact information for the author of a page. It was quite explicitly specified to not accept mailing addresses. Of course, tons of people did just that, because they had an address and there was an address element, so of course they went together!
BlogFish: Ruby on Rails Security
Recently I've been made aware of people inside US Government organizations using my Ruby on Rails Security presentation as an excuse to limit Ruby on Rails adoption and projects inside those organizations.
AnthonyCaliendo's acts_without_database at master - GitHub
Another ActiveModel alternative.
Celerity | Easy and fast functional test automation for web applications
Celerity is a JRuby wrapper around HtmlUnit – a headless Java browser with JavaScript support. It provides a simple API for programmatic navigation through web applications. Celerity aims at being API compatible with Watir.
rvm: Ruby Version Manager - rvm Home
You want to try out all of the different ruby interpreters and versions including different patchlevels, but you don't want to break what's working for you now. No time to waste?