How to test controllers with nested routes using rspec
问题 I create controller with InherritedResource class AppsController < InheritedResources::Base belongs_to :company # Devise before_filter :login_or_oauth_required # CanCan load_and_authorize_resource end and try to test it with Rspec by this method require "spec_helper" include Devise::TestHelpers describe AppsController do before(:each) do @company_1 = Factory.build(:company) application_1 = Factory.create(:application, :company => @company_1) application_2 = Factory.create(:application,