28 Oct '13, 9pm

Need to test a custom #rails form builder?

Rails gives you the ability to customize the output when using the form_for view helper in a view by using a custom form builder. This functionality is great if you want to change the default HTML generated by the form_for view helper. Figuring out how to test your custom form builder is not so easy. In order to instantiate a form builder, you need a template object. This object is typically the view that is getting rendered but if you are trying to unit test your custom form builder, you don’t necessarily have one of those laying around. The easiest way to make one is to extend a plain, old Ruby object with a couple of ActionView modules: @template = Object.new @template.extend ActionView::Helpers::FormHelper @template.extend ActionView::Helpers::FormOptionsHelper You can then use this object as the template in your tests: foo = Foo.new form_builder = FooEditFormBuilder.n...

Full article: http://pivotallabs.com/testing-custom-form-builder/

Tweets

Acceptance Testing with Page Objects via @pivot...

pivotallabs.com 28 Oct '13, 3am

An acceptance test suite goes through stages of complexity. Our first acceptance tests started off using a browser DSL lik...

Nike LeBron 11 "Laser" Custom

Nike LeBron 11 "Laser" Custom

nicekicks.com 30 Oct '13, 5pm

The recently released “King’s Pride” colorway sees camo detailing on the Nike LeBron 11 “Laser” Custom . Created for Dawee...

Setting Up Rails Engine With Rspec, Guard and Zeus

rubyflow.com 29 Oct '13, 4am

Setting Up Rails Engine With Rspec, Guard and Zeus Posted by nepalonrails on October 29, 2013 — 0 comments I love the spee...

How an iPod Could Transform Drug Testing

spectrum.ieee.org 29 Oct '13, 6pm

Researchers at Rice University and a Houston-based startup have developed an iOS app that enables a nanoparticle-based ass...

Customizable uggs!

uggaustralia.com 30 Oct '13, 1pm

Your browser's Javascript functionality is turned off. Please turn it on so that you can experience the full capabilities ...

Get ready for M-PCIe testing by Chris Loberg @EDNcom @EETimes @UBMDesignCon

Get ready for M-PCIe testing by Chris Loberg @E...

edn.com 27 Oct '13, 9pm

The PCI-SIG, the organization responsible for PCI Express, and the MIPI Alliance, the organization behind M-PHY, are in th...

この記事参考になる。ネットのrailsのバリデーション情報間違いまくりで全然役に立たない…。- Validations in Rails 3

この記事参考になる。ネットのrailsのバリデーション情報間違いまくりで全然役に立たない…。-...

asciicasts.com 25 Oct '13, 12am

Another new feature in Rails 3 is the ability to reflect on validations. We can use this if, for example, we want to put a...

“Ruby on Rails とは - 株式会社オイアクス”

“Ruby on Rails とは - 株式会社オイアクス”

oiax.co.jp 03 Nov '13, 4am

INNER JOIN companies ON employees.company_id = companies.id;

One-Hour Workout: Form-Focused Run Session via @TriathleteMag

One-Hour Workout: Form-Focused Run Session via ...

triathlon.competitor.com 29 Oct '13, 3pm

This week’s run workout comes from USAT Level I coach Jessica Dollar of Nashville-based FTP Coaching (Ftpcoaching.com ). “...

Interesantes los shorthands para parciales en r...

guides.rubyonrails.org 25 Oct '13, 2pm

To find the current layout, Rails first looks for a file in app/views/layouts with the same base name as the controller. F...

Also it took me way too long to figure out how ...

guides.rubyonrails.org 02 Nov '13, 4pm

def start url = "#{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}" puts "=> Booting #{Activ...

Writing Rails engine rspec controller tests #rails

pivotallabs.com 04 Nov '13, 6pm

If you are trying to test controllers under a Rails engine, you might come across this error: Failure/Error: get :index Ac...