Re: Re: Re: Re: Command line ferret engine

Colin Law
2010-01-21T14:37:16Z

2010/1/21 Hemant Bhargava
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:
> Ok fine. Sorry for that ..
>
> The scenario is i have some data into my fixtures and i am using rake
> db:fixtures:load to load that data into development database and to load
> the development database data into test i am using rake db:test:load..i
> think its right.. is''nt it? or should i use rake db:test:clone..

I don''t know whether that is right, I have never tried it that way.
Have you looked at the test db to check that the data are there?

Usually the fixtures are loaded into the test db at test time.  I
presume you have worked through the Testing guide at
http://guides.rubyonrails.org/.

Colin

>
>
> Colin Law wrote:
>>
>> I don''t think rake db:test:load loads the development data
into the
>> test db.  For testing you should either be using fixtures or another
>> method of loading the db with test data.
>>
>> It is better to insert replies into posts rather than top posting as
>> then it is easier to see which question is being answered.  See below
>>
>>>> browser and running it from the test?
>> You have not answered the question above
> I do not know this. This is what i am conflicting my head upon. I am
> executing the same method and passing the same paramters to method.
> Checked it many times. The only thing i found is that when i search with
> browser- search query which is "Summary.find_with_ferret(fuzzy_query,
> {:limit => :all})" gives me the results but when i run it in a
test, it
> gives me nothing. That what we have to find out that why this query
> return nothing.

As mentioned above I think the first thing is to confirm that the data
are in the test db ok.  Are there other tests that rely on the data
that should be there.  Are they passing?

Colin

>
> I hope you got it right now. :)
>
>>
>>>> When you say the search is not working in the test what do you
mean?
>>
>> You have not answered the question above
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at