";s:4:"text";s:3220:"Da ich beim Testen ziemlich neu war, habe ich mich gefragt, wie viele dieser Tests sinnvoll sind. RSpec kürzere Backtrace-Ausgabe für Testfehler (3) Ich verwende RSpec (neueste Version, 2.12.2), um eine kleine Ruby-Klasse zu testen, an der ich gerade arbeite. A controller spec is an RSpec wrapper for a Rails functional test test - ruby rspec controller . A quick google search shows that in the RSpec 3.5 release notes… RSpec Rails Controller Test Nesha Z. I have controller: class AccountController < ApplicationController def index end private def current_account @current_account ||= current_user.account end end How to test private method current_account with rspec? I use Rspec2 and Ruby on Rails 3 To use it, just add a .rspec file to your project's root directory, and run the autotest command as normal: Ich würde mich sehr über Ihre Vorschläge zur Verbesserung (z. For some reason, the default RSpec-Rails configuration disables rendering of templates for controller specs. RSpec test not passing on my users controller `Expected response to be a <3XX: redirect>, but was a <200: OK>` Hot Network Questions Find the burglar by covering all the streets rspec-autotest . RSpec Autotest ships with a specialized subclass of Autotest. test - ruby rspec controller . Controller specs are marked by :type => :controller or if you have set config.infer_spec_type_from_file_location! Der folgende Code ist eine Controller-Spezifikation, die in einer Rails 4.2-Anwendung mit RSpec 3.5 verwendet wird. In my opinion, This is a very poor recommendation that leads to a false sense of security. P.S. 's Picture Nesha Z. February, 2018 Rails is a web development framework, where model, view and controller are important aspects of your application.