E.E.33
E.E.33

Reputation: 2011

Trying to run test using 'rspec' but can't due to my omniauth.rb

Has my whole testing ability been render useless with the inclusion of Omniauth? When running any 'rspec' commands I immediately recieve this error:

config/initializers/omniauth.rb:4:in `block in <top (required)>': uninitialized constant TWITTER_KEY (NameError)

TWITTER_KEY has been defined in my /config/environment/development.rb. Why doesn't Rspec know this? how can I inform rspec of this?

Upvotes: 0

Views: 78

Answers (1)

Alex Teut
Alex Teut

Reputation: 844

Quick solution: define TWITTER_KEY in /config/environment/test.rb

Upvotes: 1

Related Questions