Mohnish J. wrote in post #1033006:
> Sidu Ponnappa wrote in post #1032900:
>>> I'm getting a common error for all such defined methods saying that>
>> `database_name.table_name does not exist`. Well , this is true but how>
>> should is
>> it really making a difference?, and how to get a work around> for this
>> to just
>> test a simple use case of calling a method successfully> in the above
>> context.
>> I don't believe this issue has anything to do with RSpec (you'd see
>> the same if you used MiniTest or any other tool).
>>
>> You want to have Moderator be a simple Ruby object, or possibly have
>> it inherit from ActiveModel rather than ActiveRecord.
>>
>> Best,
>> Sidu.
>> http://c42.in
>> http://rubymonk.com
>
> Thanks for your inputs Sidu,I tried replacing ActiveRecord with
> ActiveModel got the following error:-
>
>
> 
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/restfulie-1.0.3/lib/restfulie/server/action_controller/patch.rb:2:
> warning: already initialized constant HTTP_METHODS
> /home/mohnish/Cognizant/socialtango/app/models/admin_stats.rb:1:in `<top
> (required)>': uninitialized constant ActiveModel::Base (NameError)
>
>
> Seems like, I will have to look for another workaround..

Well,

The below line code did work for me:-

Model_name.method_name.should_not be_nil

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to