public
Created

This is NOT how you use RSpec

  • Download Gist
foo_spec.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12
describe Foo do
before(:each) do
setup
end
 
def setup
@foo = Foo.new
end
 
# shitty specs with an IVAR!!!
# ...
end

If using ivars in tests is shitty, then... uh... I guess ALL MY TESTS EVER suck. Oh, except maybe the half-dozen or so I wrote since I noticed that MiniTest has #let.

Yep, all_sams_tests - sams_tests_with_let = le_suck

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.