Forum: Ruby on Rails Testing for a a new file using Rspec

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Beriahotep (Guest)
on 2009-02-26 10:33
(Received via mailing list)
Hi,

I am new to Rspec so i am not sure if this can be done. I want to
write a test that the outcome of a function is that a new file is
successfully created in a directory. The test would be somthing like
"it should save the xml to a file in /path/foo".

Can this be done? If so how is it done? (I am guessing it would be a
clause in the "after" method.

Regards,
Beriahotep
Davi V. (Guest)
on 2009-02-26 14:38
(Received via mailing list)
Beriahotep wrote:
> Hi,
>
> I am new to Rspec so i am not sure if this can be done. I want to
> write a test that the outcome of a function is that a new file is
> successfully created in a directory. The test would be somthing like
> "it should save the xml to a file in /path/foo".
>
> Can this be done? If so how is it done? (I am guessing it would be a
> clause in the "after" method.
>

  It's not what you're searching for, but can be a start line. :-)

http://cassiomarques.wordpress.com/2009/01/23/how-...


  Hth,


Davi V.
This topic is locked and can not be replied to.