Found the magic incantation for devise controller specs.
This commit is contained in:
parent
698dafb344
commit
21d213059c
1 changed files with 22 additions and 0 deletions
22
spec/controllers/registrations_controller_spec.rb
Normal file
22
spec/controllers/registrations_controller_spec.rb
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright (c) 2010, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
||||
require File.join(File.dirname(__FILE__), "..", "spec_helper")
|
||||
|
||||
describe RegistrationsController do
|
||||
include Devise::TestHelpers
|
||||
|
||||
render_views
|
||||
|
||||
before do
|
||||
request.env["devise.mapping"] = Devise.mappings[:user]
|
||||
end
|
||||
|
||||
describe "#new" do
|
||||
it "succeeds" do
|
||||
get :new
|
||||
response.should be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue