require 'spec_helper' describe 'configuration' do before do Forem::Engine.user_class = nil end after do Forem::Engine.user_class = User end it "user_class must be set" do config = lambda { Forem::Engine.user_class } error = "Please define Forem::Engine.user_class" + " in config/initializers/forem.rb" config.should raise_error(Forem::ConfigurationNotSet, error) Forem::Engine.user_class = User config.should_not raise_error(Forem::ConfigurationNotSet) end end