16 Sep '13, 2pm

Writing Rails engine rspec controller tests by @benjamin_smith

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 two possible solutions to this problem. 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 this use_route param in EVERY...

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

Tweets

Really like this overview of rspec strategies:

pivotallabs.com 17 Sep '13, 6pm

These are some tricks, tips, strategies, lessons learnt from a year of working with RSpec on Rails projects. Rails convent...

Slides from my @rockymtnruby architecture talk:...

pivotallabs.com 26 Sep '13, 8pm

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

Now available - Spree 2.1 with Rails 4 support

spreecommerce.com 16 Sep '13, 7pm

We have just released a patch version to the Spree 2.0.x series. Spree 2.0.5 is now officially available and it addresses ...

Contribute to Ruby on Rails Guides Guidelines:

edgeguides.rubyonrails.org 16 Sep '13, 6pm

Guides are written in GitHub Flavored Markdown . There is comprehensive documentation for Markdown , a cheatsheet , and ad...

Distec - Novel display controller satisfies the needs of the smallest industrial applications

Distec - Novel display controller satisfies the...

electropages.com 15 Sep '13, 6pm

“PrismaMINI marks the onset of a new concept that meets the constantly growing need for minimal space requirements and hig...

ну как-то так

m.onkey.org 17 Sep '13, 11pm

Rails 2.2 marks the first release of thread safe Rails. But “thread safety” alone, without any context, doesn’t mean shit....

rails はなんでもあるなぁ。

rails はなんでもあるなぁ。

oiax.jp 24 Sep '13, 2pm

% rake routes root / {:controller=>"welcome", :action=>"index"} new_user_session GET /users/sign_in {:controller=>"devise/...

@kerrizor I don't think there's anything in min...

api.rubyonrails.org 29 Sep '13, 6pm

Test numeric difference between the return value of an expression as a result of what is evaluated in the yielded block. a...