04 Nov '13, 6pm

Writing Rails engine rspec controller tests #rails

If you are trying to test controllers under a Rails engine, you might come across this error: Failure/Error: get :index ActionController::UrlGenerationError: No route matches {:action=>"index", :controller=>"engine_name/controller_name"} Despite, setting up your routes, controller, and mount correctly, the tests cannot find your route. There are three possible solutions to this problem (the third is my favorite). Solution 1: You can specify a use_route param in each of your controller spec get/post/put/delete calls. The use_route param goes inside of HTTP params and needs a value that matches your engine name in snake case. So if you want to do a GET to the index action of a PostsController located in a MyBlog engine, then your test would look like: it "does something..." do get :index, use_route: :my_blog ... end The down fall to this solution is that you have to specify ...

Full article: http://pivotallabs.com/writing-rails-engine-rspec-control...

Tweets

First Tranche 3 #TyphoonJet completes engine te...

baesystems.com 04 Nov '13, 2pm

This page uses JavaScript and requires a JavaScript enabled browser.Your browser is not JavaScript enabled.

Rails for Zombies

railsforzombies.org 04 Nov '13, 4pm

1 Intro 2 Learning about database tables 3 Reviewing Ruby Hashes 4 Creating new Tweets 5 Reading out of the database 6 Upd...

RSpec formats and the Single Responsibility Pri...

pivotallabs.com 03 Nov '13, 6pm

For years, my unit tests have largely followed the “method spec” format: describe SomeObject do describe "#some_method" do...

Testing with RSpec for Rails 4 is done

everydayrails.com 07 Nov '13, 11am

Testing with RSpec for Rails 4 is done August 21, 2013 As I type this, Leanpub’s robots are busily formatting Everyday Rai...

Almost functional tests. No wonder rails devs g...

guides.rubyonrails.org 11 Nov '13, 11pm

Testing support was woven into the Rails fabric from the beginning. It wasn't an "oh! let's bolt on support for running te...

*george washington what the fuck is this*

edgeguides.rubyonrails.org 12 Nov '13, 6am

class ClientsController < ApplicationController # This action uses query string parameters because it gets run # by an HTT...

@whatsuprocky nice:

ruby5.envylabs.com 05 Nov '13, 8pm

Episode #416 – November 1st, 2013 Tear down the Rumble, fear Backbone and Angular, a dark statesman will arise and table_p...

Everyday Rails Testing with RSpec, the book now...

everydayrails.com 07 Nov '13, 11am

Everyday Rails Testing with RSpec, the book now covers Capybara 2.0, RSpec's new syntax, and more February 13, 2013 Hey ev...

Audit ActiveRecord models in rails 4

rubyflow.com 04 Nov '13, 3pm

Audit ActiveRecord models in rails 4 Posted by michelson on November 04, 2013 — 0 comments Audit activerecord models like ...

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...

Новая версия Rails 4.0.1

rubyflow.ru 05 Nov '13, 7am

Это баг-фикс релиз, который включает в себя более 460 коммитов. Основное изменение касается того, как Active Record обраба...

Top 5 free tutorials for beginning Ruby on Rails developers

Top 5 free tutorials for beginning Ruby on Rail...

railshosting.org 04 Nov '13, 11am

Top 5 free tutorials for beginning Ruby on Rails developers Posted by Collin on 06/06/2011 in Rails Tutorials , Heroku , a...

rails の Application Templates 作ろうかと思ったんだけど、そんなに...

guides.rubyonrails.org 07 Nov '13, 6am

$ rails generate scaffold User name:string invoke active_record create db/migrate/20130924151154_create_users.rb create ap...