Skip to content

Instantly share code, notes, and snippets.

@daicoden
Created October 25, 2010 06:37
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 daicoden/644509 to your computer and use it in GitHub Desktop.
Save daicoden/644509 to your computer and use it in GitHub Desktop.
## spec_helper
Rspec.configure do |config|
config.include Devise::TestHelpers
config.before(:authenticate => :admin) do
#sign_in User.find_by_email("admin@example.com") If you uncomment this it crashes with the nil error
end
end
# Spec
before do
#sign_in User.find_by_email("admin@example.com") If you uncomment this it passes
end
describe "enumeration_symbols" do
it "returns the symbolized underscore of ENUMERATIONS" do
Admin::EnumerationsController.enumeration_symbols.should == [:enumeration_type_a, :enumeration_type_b]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment