Skip to content

Instantly share code, notes, and snippets.

@jc00ke
Created February 20, 2012 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jc00ke/1872159 to your computer and use it in GitHub Desktop.
Save jc00ke/1872159 to your computer and use it in GitHub Desktop.
This is NOT how you use RSpec
describe Foo do
before(:each) do
setup
end
def setup
@foo = Foo.new
end
# shitty specs with an IVAR!!!
# ...
end
@geeksam
Copy link

geeksam commented Feb 21, 2012

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.

@jc00ke
Copy link
Author

jc00ke commented Feb 21, 2012

Yep, all_sams_tests - sams_tests_with_let = le_suck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment