Please include "require 'spec_helper'" in the documentation #581

Closed
jessicalevine opened this Issue Jul 30, 2012 · 3 comments

Projects

None yet

3 participants

@jessicalevine

When trying to write tests for some of my helpers, I spent nearly an hour trying to figure out why ActiveAdmin::OrdersHelper, and even Rails wasn't accessible when I ran my tests (through rspec and rake spec). Cryptic NameErrors weren't helping (uninitialized constant Object::ActiveAdmin). Finally, I realized it was because, when following the example helper test code from the rspec-rails documentation, I hadn't required spec_helper at the top of the file.

Can you please include require 'spec_helper' in the top of the test examples?

@dchelimsky
Member

Can I get a link to the docs you're looking at?

@jessicalevine

I'm whipping up a pull request with my proposed changes.

@alindeman alindeman closed this in 72ceb3c Aug 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment