steveklabnik / request_store

Per-request global storage for Rack.
https://github.com/steveklabnik/request_store
MIT License
1.47k stars 87 forks source link

check RequestStore.store instead of Thread.current[:request_store] in middleware test #5

Closed timoschilling closed 11 years ago

timoschilling commented 11 years ago

respect the law of demeter

steveklabnik commented 11 years ago

The original intention of this test is to check that it resets the underlying store, not sure if I feel like this is best. But maybe? I guess I have a unit test that asserts that already.

timoschilling commented 11 years ago

yes, but the middleware test should not test the internals of the store by reading from the Thread, with reading from RequestStore.store middleware don't need knowledge of RequestStore internals

steveklabnik commented 11 years ago

Seems good. You've convinced me.