Marko Anastasov wrote this on October 5, 2009

Standup 2009/10/05

  • Polymorphic associations and Factory Girl: in your tests you need to create your objects separately and connect them as you would in the controller — for example:
  event = Factory(:event)
  rev = Factory.build(:revision, :user_id => event.user.id)
  event.revisions << rev
  assert event.save
  assert rev.save
  • A new version of rails.vim is out. When you install it, you get lots of handy shortcuts. For example, if you’re editing a file containing a test, typing :Rake will run it. :Rcontroller events will open EventsController, gf< over has_many :nap*kins opens Napkin model file and so on. In practice, with Vim’s autocompletion you actually need to type just two characters.

  • For apps running on Rails 2.3.4 make sure you upgrade your version of Passenger (currently 2.2.5), or you’ll get strange exceptions mentioning rewind and Unix sockets in their backtrace.

comments powered by Disqus

About Marko Anastasov

Marko co-founded Rendered Text. He’s a programmer with a passion of creating something for other people, coupled with interests in how things work in the society and nature. He is having a great time working across many areas in the company, including product design, helping the engineering teams, empowering users and marketing. He likes to counterbalance it all with running, cycling or a day in the woods.

Suggested Reads

Inject is a fundamental building block

Inject is one of the fundamental, and most versatile constructs available in functional languages. It can be used to implement map, select, max, all? and a bunch of other iteration related methods. Unfortunately, many programmers are not aware of its awesome powers. This article is here to improve this fact.

Contact

Rendered Text is a software company. For questions regarding Semaphore, please visit semaphoreci.com. Otherwise, feel free to get in touch any time by sending us an email.

Rendered Text
Svetozara Miletica 10
21000 Novi Sad
Serbia