16 Matching Annotations
  1. Feb 2022
    1. https://www.latimes.com/california/story/2022-02-09/riverside-sohcahtoa-teacher-viral-video-mocked-native-americans-fired

      Riverside teacher who dressed up and mocked Native Americans for a trigonometry lesson involving a mnemonic using SOH CAH TOA in Riverside, CA is fired.

      There is a right way to teach mnemonic techniques and a wrong way. This one took the advice to be big and provocative went way overboard. The children are unlikely to forget the many lessons (particularly the social one) contained here.

      It's unfortunate that this could have potentially been a chance to bring indigenous memory methods into a classroom for a far better pedagogical and cultural outcome. Sad that the methods are so widely unknown that media missed a good teaching moment here.

      referenced video:

      https://www.youtube.com/watch?v=Bu4fulKVv2c

      A snippet at the end of the video has the teacher talking to rocks and a "rock god", but it's extremely unlikely that she was doing so using indigenous methods or for indigenous reasons.

      read: 7:00 AM

  2. Jun 2021
    1. Mocking is a form of global state like others (including ENV sharing), which will cause difficulties here (more with threads, a bit less with forks).
  3. Apr 2021
    1. let(:warden) do instance_double('Warden::Proxy').tap do |warden| allow(warden).to receive(:authenticate!).with(scope: :user) .and_return(authenticated?) allow(warden).to receive(:user).with(:user).and_return(user) end end let(:user) { instance_double(User) } let(:authenticated?) { true } def simulate_running_with_devise stub_const( 'Rack::MockRequest::DEFAULT_ENV', Rack::MockRequest::DEFAULT_ENV.merge('warden' => warden), ) end
  4. Mar 2021
    1. This helper allows you to mock any step within a given or deeply nested activities.
    2. To skip processing inside :load_user and use a mock instead, use mock_step.
  5. Aug 2020
  6. Apr 2020
  7. Nov 2019
    1. When you mock something, you're making a trade-off. You're trading confidence for something else. For me, that something else is usually practicality — meaning I wouldn't be able to test this thing at all, or it may be pretty difficult/messy, without mocking. (Like in our credit card example.)
    1. I don't recommend unit testing stateful components, or components with side-effects. Write functional tests for those, instead, because you'll need tests which describe the complete end-to-end flow, from user input, to back-end-services, and back to the UI. Those tests frequently duplicate any testing effort you would spend unit-testing stateful UI behaviors. You'd need to do a lot of mocking to properly unit test those kinds of components anyway, and that mocking may cover up problems with too much coupling in your component.
  8. Dec 2015
    1. The basic principle is that you patch where an object is looked up, which is not necessarily the same place as where it is defined. A couple of examples will help to clarify this.

      This caught me out, as it did for a lot of other people apparently, see also this useful post about Python Mock gotchas: http://alexmarandon.com/articles/python_mock_gotchas/