On 8/22/07, Shaker <[EMAIL PROTECTED]> wrote:
>
> Good morning, dear fellows:
> I'd like to recall one question I posted yesterday. I am writing specs
> for ruby modules. Some of the modules do some data process in the test
> database. Because 'fixtures' is undefined (Am I correct?) in module s
Good morning, dear fellows:
I'd like to recall one question I posted yesterday. I am writing specs
for ruby modules. Some of the modules do some data process in the test
database. Because 'fixtures' is undefined (Am I correct?) in module specs,
spec of certain module (e.g. delete data form dat
I think you need to clarify what you mean by 'spec an attachment_fu model'.
Do you want the validates_as_attachment to succeed with your test data,
for instance? If so, simply stub the call:
Picture.should_receive(:validates_as_attachment) so that you can be
confident the model does the right
On 8/22/07, David Green <[EMAIL PROTECTED]> wrote:
>
> I have a couple of methods which make networks calls. Where's the best
> place
> to stub them so they are stubbed for every description automatically? I
> tried in spec_helper.rb but they are no longer stubbed when a spec runs.
>
> at the mom
On 8/22/07, Matt Lins <[EMAIL PROTECTED]> wrote:
>
> No, as mentioned in my first post, the property that needs to be fulfilled
> is uploaded_data. I posted the accessor in my first post as well.
>
Which part of my answer are you answering no to? Can you inline your
answers so I can follow?
>
>
No, as mentioned in my first post, the property that needs to be
fulfilled is uploaded_data. I posted the accessor in my first post as well.
aslak hellesoy wrote:
On 8/22/07, Matt Lins <[EMAIL PROTECTED]> wrote:
Sorry, attachment_fu is a plugin for handling binary data. It handles
storing
On 8/22/07, David Green <[EMAIL PROTECTED]> wrote:
>
> I have a couple of methods which make networks calls. Where's the best place
> to stub them so they are stubbed for every description automatically? I
> tried in spec_helper.rb but they are no longer stubbed when a spec runs.
>
> at the moment,
# TODO: Allow it to work with Merb tempfiles too.
def uploaded_data=(file_data)
return nil if file_data.nil? || file_data.size == 0
self.content_type = file_data.content_type
Durh... stupid me, didn't see this post! :)
:: Justin Reagor
:: [EMAIL PROTECTED]
:: Justin
I have a couple of methods which make networks calls. Where's the best place
to stub them so they are stubbed for every description automatically? I
tried in spec_helper.rb but they are no longer stubbed when a spec runs.
at the moment, I'm checking for the test environment in the methods
themse
On 8/22/07, Matt Lins <[EMAIL PROTECTED]> wrote:
>
> Sorry, attachment_fu is a plugin for handling binary data. It handles
> storing the file in the file system and storing some helpful data in the
> database about the file.
>
> The previous code is from the attachment_fu plugin(no, I didn't mod
I just got finished working with attachment_fu, and ended up modeling
a plugin for my company since attachment_fu was slight over kill for
our needs.
Have you opened up attachment_fu's source? upload_data is just a
method (so is upload_data=) which is inserted into a model that calls
has
Sorry, attachment_fu is a plugin for handling binary data. It handles
storing the file in the file system and storing some helpful data in the
database about the file.
The previous code is from the attachment_fu plugin(no, I didn't modify
it). This property needs to be satisfied in order for
On 8/22/07, Matt Lins <[EMAIL PROTECTED]> wrote:
>
> 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(othe
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_dat
Here is an example from RSpec's own specs:
describe Enumerable do
def each(&block)
["4", "2", "1"].each(&block)
end
it "should be included in examples because it is a module" do
map{|e| e.to_i}.should == [4,2,1]
end
end
If you pass the module to de
15 matches
Mail list logo