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 => ‘[email protected]’
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…