On 2008-11-18, at 01:53, Mano ah wrote:
Nick Hoffman wrote:
On 2008-11-14, at 06:29, Mano ah wrote:
image = Image.new
image.blob= params[:image][:blob]
image.save_picture
end
--
Hi Mano. It doesn't really matter whether or not your "picture" model
interacts with a database
Thank you
All the above specification passed. Now I want to test the return
value. I mean
def scan
#---
if request.post?
image = Image.new
image.blob= params[:image][:blob]
if image.save_picture
@code = returns a barcode image value
e
Nick Hoffman wrote:
> On 2008-11-14, at 06:29, Mano ah wrote:
>> image = Image.new
>>
>> image.blob= params[:image][:blob]
>>
>> image.save_picture
>>
>>end
>> --
>
> Hi Mano. It doesn't really matter whether or not your "picture" model
> interacts with a database. Simply use
On 2008-11-14, at 06:29, Mano ah wrote:
can i know how to test a picture upload which dosent interact with db
my code is
def scan
#---
if request.post?
image = Image.new
image.blob= params[:image][:blob]
image.save_picture
end
--
Hi Mano. It doesn't really m
can i know how to test a picture upload which dosent interact with db
my code is
def scan
#---
if request.post?
image = Image.new
image.blob= params[:image][:blob]
image.save_picture
end
--
Posted via http://www.ruby-forum.com/.
__
Hmm.. not sure what that error is. The veterans in here might be able
to help you. The create action should work... btw, this is a model
spec, not a controller spec, just in case you're a newbie.
Ramon Tayag
On Thu, Nov 13, 2008 at 8:48 PM, Mano ah <[EMAIL PROTECTED]> wrote:
> Can I know what t
Ramon Tayag wrote:
> I suggest doing those tests in the model, not in the controller. Just
> do that fixture thing for the controller spec to pass. But pass the
> same thing in the model. Here's a sample of how I do it
>
> require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
>
I suggest doing those tests in the model, not in the controller. Just
do that fixture thing for the controller spec to pass. But pass the
same thing in the model. Here's a sample of how I do it
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe ProductImage do
befo
Ramon Tayag wrote:
> You can put that barcode in the spec/fixtures directory. However,
> you'll need to manually place it there.
>
> Ramon Tayag
ok. Also please can i know how to test sending an image using rspec.
--
Posted via http://www.ruby-forum.com/.
You can put that barcode in the spec/fixtures directory. However,
you'll need to manually place it there.
Ramon Tayag
On Thu, Nov 13, 2008 at 7:18 PM, Mano ah <[EMAIL PROTECTED]> wrote:
> Actually i need to test sending a barcode image and also test a value
> returned by it.
> --
> Posted via h
Actually i need to test sending a barcode image and also test a value
returned by it.
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Wed, Nov 12, 2008 at 3:18 AM, Mano ah <[EMAIL PROTECTED]> wrote:
> How can i test the action of a controller which requires picture?
>
> I mean, as part of the test I want to pass a picture (somekind of
> fixture) and test to see if the result is correct
I'm pretty sure you're looking for this:
How can i test the action of a controller which requires picture?
I mean, as part of the test I want to pass a picture (somekind of
fixture) and test to see if the result is correct
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
13 matches
Mail list logo