Bob Nadler, Jr. Bob Nadler, Jr.

RubyMotion: Clearing Out motion-stump Mocks

Published almost 10 years ago less than 1 min read
Newly cut
Image by Kathleen Tyler Conklin

Update: The pull request mentioned below has been merged and motion-stump clears mocks automatically now, so this after block is no longer necessary.

This one had me "stumped" for awhile. When using motion-stump mocks, you need to clear them in an after block like this:

after do
  Stump::Mocks.clear!
end

Someone has submitted a pull request to motion-stump for this to happen automatically but it hasn't been merged yet.


Share This Article