Try "receive" instead of "recieve"
On Jul 13, 8:31 pm, J Poz
<jpozd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello all,
>
> I''ve been bashing my head against the wall this this one, and can
find
> anything about why this would be happening.
>
> I keep getting "undefined method `should_recieve'' " when
ever I''m
> trying to mock a model with RSpec.
>
> My Rspec code is the following:
>
> before(:each) do
> zipcode = 98117
> xml = File.read(RAILS_ROOT + "/spec/fixtures/feeds/
> feed_for_98117.xml")
>
> Weather.should_recieve(:open).
>
with("http://weather.yahooapis.com/forecastrss?p=#{zipcode}").
> and_return(xml)
>
> @weather = Weather.new
> end
>
> The Error message is:
>
> undefined method `should_recieve'' for #<Class:0x22ada80>
> /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/
> base.rb:1532 :in `method_missing''
> /Users/Poz/Sites/Rails/forcaster/spec/models/weather_spec.rb:21
>
> 1530 send(method_id, *arguments)
> 1531 else
> 1532 super
> 1533 end
> 1534 end
> 1535# gem install syntax to get syntax highlighting
>
> Anyone have any idea what''s going on??
>
> Thanks in advance!
> JPoz
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---