search for: reagor

Displaying 2 results from an estimated 2 matches for "reagor".

Did you mean: reader
2008 May 20
7
Expect with "real world" returns?
Is there a way to do something like this? class Foo def self.hello(name) "Hello #{name}!" end end Foo.expects(:bar).with("Carl").once assert_equal "Hello Carl!", Foo.hello Basically, my problem is that once you set an expectation, the original code is never executed and is not tested. However, it''s still very useful to set expectations to
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested. But, I added some code to that model that I do need to test. Basically, I need to somehow fulfill the "uploaded_data" property so I can actually run my tests(otherwise they fail because of validations). The "uploaded_data" field is what would grab the multipart data from form. Here