spec/unit/devise_spec.rb in activeadmin-0.6.0 vs spec/unit/devise_spec.rb in activeadmin-0.6.1
- old
+ new
@@ -10,39 +10,39 @@
klass.send(:include, ActiveAdmin::Devise::Controller)
klass
end
let(:controller) { controller_class.new }
-
+
context 'with a RAILS_RELATIVE_URL_ROOT set' do
-
+
before { Rails.configuration.action_controller[:relative_url_root] = '/foo' }
-
+
it "should set the root path to the default namespace" do
controller.root_path.should == "/foo/admin"
end
it "should set the root path to '/' when no default namespace" do
ActiveAdmin.application.stub!(:default_namespace => false)
controller.root_path.should == "/foo/"
end
-
+
end
-
+
context 'without a RAILS_RELATIVE_URL_ROOT set' do
-
+
before { Rails.configuration.action_controller[:relative_url_root] = nil }
-
+
it "should set the root path to the default namespace" do
controller.root_path.should == "/admin"
end
-
+
it "should set the root path to '/' when no default namespace" do
ActiveAdmin.application.stub!(:default_namespace => false)
controller.root_path.should == "/"
end
-
+
end
context "within a scoped route" do
SCOPE = '/aa_scoped'
@@ -69,10 +69,10 @@
it "should include scope path in root_path" do
controller.root_path.should == "#{SCOPE}/admin"
end
end
-
+
describe "#config" do
let(:config) { ActiveAdmin::Devise.config }
describe ":sign_out_via option" do