Rails 5 - What's In It For You?

Rails 5 is on the horizon and now's the perfect time to take a look at the features and changes coming with this major release. Derek Prior takes us on a tour of the changes, as well as showing us how to upgrade to the current Rails 5 beta.

This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/rails-5-whats-in-it-for-you

Hi! Great video, thanks for showing us some of Rails 5.

In the video Chris mentioned you might want to get away from testing controllers by checking whether they assign the right instance variables or render the right templates, and it seems like this is a pretty popular opinion in the Rails community given the core team is moving these features into a stand-alone gem. I’m just wondering how you do test your controllers if not this way.

When testing controllers, I try to focus on what they do rather than how they work (testing for variables). So if we have a before_action that redirects non-admins, then I’ll exercise that and get to an assertion about expect(response).to redirect_to(root_path) or similar. For actual content on the page or full behavior I lean towards feature specs. Hope that helps!

Will there be a Rails 5 Intermediate trail coming any time soon? I’m going through the current Rails Intermediate trail, but it’s in Rails 3. I’d love to see a Rails 5 trail on Upcase.