def controller(*args, &body)
      if block_given?
        controller_class.class_eval(&body)

        resource_set = self.instance_variable_get('@_resources')
        resource_set = self.instance_variable_get('@__memoized') unless resource_set.present?
        resource_key = "#{controller_class.key}".singularize.intern

        @controller.resources = (resource_set[resource_key] || resource_set[controller_class.key])
      end

      super()
    end
def controller(*args, &body)
      if block_given?
        controller_class.class_eval(&body)

        resource_set = self.instance_variable_get('@_resources')
        resource_set = self.instance_variable_get('@__memoized') unless resource_set.present?
        resource_key = "#{controller_class.key}".singularize.intern

        @controller.resources = (resource_set[resource_key] || resource_set[controller_class.key])
      end

      super()
    end
Add `#controller` ExampleGroup instance method which, combined with the
 overriden class method above, provides the ability to:

 @example
   describe "GET #index" do
     controller(:products)

     before do
       controller do
         def index
           respond_with(products)
         end
       end
     end

     it "is successful" do
       get(:index)
       expect(response).to be_success
     end
   end