…Learned something new there. Honestly, I didn't expect this behavior, but I understand why. Shoulda read the docs.
Now, the easy way around this is to pass into a FactoryGirl.create/build/build_stubbed a nil for the association, if it is not needed. Ala:
FactoryGirl.build stubbed(:store, company: fg_company, area: nil)
Now it won't build out the associated area. Alas, I had forgotten just one of these nil associations. And at the worst possible relationship level, the bottom. …
…me a few hours yesterday.
Sextant: A - A browser-based alternative to rake routes. to Help you Find your Routes
Rails - version 1.5.0 release of a flexible recipe-based app generator.
polyamory - runner that understands , , Shoulda, Test::Unit and more.
…testing yourapplications, from ::Unit to , Shoulda, , , and more. Only thing it doesn't cover is (that course is next month).
Those two are the most important to play through to stop bad rails code, but it also wouldn't hurt to learn some CoffeeScript , Backbone.js , or maybe learn some CSS best practices that would make your designer friends happy. We even have CodeTV screencasts on using …
We haven't been taking pull requests on shoulda-matchers as much as we shoulda, but it's back in the spotlight now. Shoulda's been gone ... but it's back.
Here are the new features in shoulda-matchers 1.1.0:
A NEWS file so you can track new hottness in REAL TIME
shoulda-matchers' very first dependency:>= 3.0.0. This was an implicit dependency for a while, but now it's official.
An only_integer option for validates_numericality_of
…Rspec and it's expressiveness, but dislike it's complexity. Finally, there it comes the Shoulda and find all the validation/association testing macros are really time savers.
As you can see, I stepped into Ruby 1.9 and find little information about a nice setup testing your ruby application in Ruby 1.9. Shoulda didn't work for me and found it wasn 't Ruby 1.9 ready at that time (couple months ago) and things may(or not) have got better.
It forced me to look for …
From ::Unit & Shoulda To :: Spec & MiniShoulda
MiniTest::Mock - the simple mocking system included in MiniTest.
Peter here! :-) I've been running an online course called Ruby Reloaded over the past couple of months for intermediate Ruby developers who want to revise the basics and pick up some new tricks. The next run will probably be in October or November so if you want to …
Rails Test Prescriptions is a comprehensive guide to testing Rails applications, covering Test-Driven Development from both a theoretical perspective (why to test) and from a practical perspective (how to test effectively). It covers the core Rails testing tools and procedures for Rails 2 and Rails 3, and introduces popular add-ons, including Cucumber, Shoulda, Machinist, Mocha, and Rcov.
…comes with a simple::Spec DSL that uses describe and it blocks much like Shoulda's context and should methods. The similarities were so close that I set out to move all my projects to MiniTest::Spec. The goal would be that none of my exiting suites context/should/before/after code would require a change. The result...
MiniShoulda is a small ruby gem that puts a Shoulda DSL on top of MiniTest::Spec. All it really does it alias a few key methods. …