Joe MooreJoe Moore
Standup 03/28/2007
edit Posted by Joe Moore on Wednesday March 28, 2007 at 04:04PM

Interesting Things

  • One pair had this reinforced: you should not generate random data in your test case to be the subject of your assertions. In their case they were generating random usernames to test an "allowed characters" filter, but their tests would intermittently succeed or fail because the test was not deterministic.
  • "A private declaration in a Helper doesn't do jack crap!" Truer words were never spoken: private and protected declarations are not enforced in Rails View Helpers due to how that code is injected into View instances.
  • A developer suggested that we attempt to do "RESTful CSS." An explanation and debate is due soon.
  • We are officially changing Wiki technologies from Twiki to Trac.
  • Rails Gotcha: You can use Named routes to generate a URL for a link with my_named_route_url, but watch out: that URL is fully qualified! If you want a relative "URL", use my_named_route_path. Example:
<code>
# config/routes.rb

login "/login", :controller => "user_management", :action => "login"
</code>

And in a any RHTML template:

<code>
login_url    # generates http://example.com/login

login_path   # generates /login
</code>
  • People need to take more time to... blog! We have a laundry list of topics but no free time.

Total Stand-up Meeting Time: 17:00 minutes

Comments

  1. Corey and Vijay Corey and Vijay on May 24, 2007 at 07:21PM

    quote: "A private declaration in a Helper doesn't do jack crap!"

    One interesting side note to this... a call to a private helper method called from a test will in fact throw an error.

    For example...

    <code>NoMethodError: private method xxx called for #&lt;#&lt;Class:0x4f4b920&gt;:0x4f4b86c&gt;
    </code>