# Problem with creating stub for model "Address"

**URL:** <https://www.ruby-forum.com/t/problem-with-creating-stub-for-model-address/149318>\
**Category:** Rails\
**Created:** [September 23, 2008, 3:57pm UTC](https://www.ruby-forum.com/t/problem-with-creating-stub-for-model-address/149318 "2008-09-23T15:57:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [September 23, 2008, 3:57pm UTC](https://www.ruby-forum.com/t/problem-with-creating-stub-for-model-address/149318/1 "2008-09-23T15:57:46Z")

</div>

Hi,

I have model name “Address”.

class Address \< ActiveRecord::Base  
end

And I have written the stub for this model.

define Address do  
belongs\_to :addressable, :polymorphic =\> true

methods :id =\> 1,  
:full\_name =\> ‘Rob Williams’,  
:street1 =\> ‘New Street’,  
:street2 =\> ‘New Street2’,  
:city =\> ‘My City’,  
:state =\> ‘My State’,  
:country =\> ‘My Country’,  
:zip\_code =\> ‘123456’,  
:phone =\> ‘999999999’,  
:email =\> ‘removed\_email\_address@domain.invalid’

end

But I am not able to use stub\_address here. The rspec takes Address as a  
plural so it searched for the Addre definition.

Is there any way to solve it?

Thanks in advance…
