bei mir liefert das erwartunsgemäß einen Fehler

 1) Error:
test_guestbook_3(CatalogControllerTest):
ActionController::UnknownAction: No action responded to hula


hast du vor deiner  Testklasse  eigentlich folgendes  drin?

 # Re-raise errors caught by the controller.
  class CatalogController; def rescue_action(e) raise e end; end


(entprechend fuer deine Namen angepasst, natürlich)


-Thomas







On 20/05/07, Michael Kastner <[EMAIL PROTECTED]> wrote:

Hallo Urban,

vielen Dank für Deine Antwort. Ich stehe vor folgendem Problem:

Egal welchen Methodennamen ich dem "get" übergebe, es wird keine Exception
geworfen.

D.h. egal ob ich nun

get :delete_bla

oder

get :delete_nonsense

oder

get :delete_author

hinschreibe, der Befehl wird schlicht ignoriert.

Ich würde zumindest eine Exception erwarten, wenn ich im Test per get eine
action aufrufe, die überhaupt nicht existiert.

Viele Grüße

Michael Kastner




Urban Hafner schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On May 20, 2007, at 15:08 , Michael Kastner wrote:
>
>> Hallo,
>>
>> ich habe hier wieder mal den klassischen Fall: Programm funktioniert,
>> aber der Test nicht.
>>
>> Ich habe diese Methode in meinem Controller/Functional-Test:
>>
>> def test_add_delete_author
>>   # erstmal Autor als Assoziation hinzufügen, damit
>>   # auch etwas zum löschen da ist
>>   product = products(:buchtitelxy)
>>   author_id = authors(:autorxy).id
>>   product.author_id= author_id
>
> Hier hast du nur einen Author unten aber authors. Ist das richtig?
> Ausserdem ist das mit author_id nicht noetig. Mach doch einfach
> product.author = author.
>
>>   product.save
>>   # jetzt möchte ich die Assoziation
>>   # wieder löschen
>>   get :delete_author, :id => product.id, :assoc_id => author_id
>>   assert_equal 0, product.authors.size
>
> Kann sein, dass du hier ein product.authors(:refresh).size machen musst,
> damit die Daten erneut aus der DB geladen werden.
>
>> end
>
> Urban
> - --
> http://bettong.net
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (Darwin)
>
> iD8DBQFGUH29ggNuVCIrEyURAgL4AJ95674RUNV07j9WTeitkWiEBKQZ4ACgpn1t
> 7gy279Xs2p5EVuzKb7zp1R4=
> =ZShK
> -----END PGP SIGNATURE-----
> _______________________________________________
> rubyonrails-ug mailing list
> [email protected]
> http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug
>
>

--

------------------------------
galt.de Web :-) Services
Michael Kastner
Berliner Straße 3
D-65439 Flörsheim

Telefon +49 (0) 6145 / 938 581
Telefax +49 (0) 6145 / 938 582
E-Mail [EMAIL PROTECTED]
Homepage http://www.galt.de
------------------------------
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

Antwort per Email an