← Back to Upcase

A error message when I doing week 4 video, Mocking, Stubs, and Spies


(Vincent Lin) #1

I am do week 4 video, Mocking, Stubs, and Spies.

At the 19:48.

When the instructor run “rspec spec/integration/search_twitter_spec.rb”, and got no error.

However, I got following error.

undefined method `Searcher’ for #RSpec::Core::ExampleGroup::Nested_1:0x007faa83cb40a0

Here is my source code.
git@github.com:vincentopensourcetaiwan/hashtag.git

Please help me to deal with this error.

Many thanks,
Vincent


(Giuseppe Modarelli) #2

Hello Vincent,

there’s a typo at line 17 of your spec
https://github.com/vincentopensourcetaiwan/hashtag/blob/master/spec/integration/search_twitter_spec.rb#L17

Searcher.searcher = FakeTwitter

instead of

Searcher searcher = FakeTwitter

(Vincent Lin) #3

Thank you for the reply, this solve the problem. Thanks a lot.