moved redirect commitment to cucumber, delivering stories
This commit is contained in:
parent
0ff541ba43
commit
f6e662a3fa
3 changed files with 20 additions and 9 deletions
|
|
@ -7,12 +7,22 @@ describe UsersController do
|
|||
end
|
||||
render_views
|
||||
#fixtures :all
|
||||
|
||||
it 'should, after logging in redirect to the dashboard page' do
|
||||
pending
|
||||
#go to /login
|
||||
#fill in the form
|
||||
#stub create action
|
||||
#should get a redirect
|
||||
end
|
||||
end
|
||||
describe Devise::SessionsController do
|
||||
before do
|
||||
#TODO(dan) Mocking Warden; this is a temp fix
|
||||
request.env['warden'] = mock_model(Warden, :authenticate => @user, :authenticate! => @user)
|
||||
@user = User.create(:email => "bob@rob.com", :password => "lala")
|
||||
end
|
||||
it 'should, after logging in redirect to the dashboard page' do
|
||||
pending "probs should be in cucumber"
|
||||
sign_in :user, @user
|
||||
# request.env['warden'].should_receive(:authenticated?).at_least(:once)
|
||||
# request.env['warden'].should_receive(:user).at_least(:once)
|
||||
|
||||
#User.any_instance.stubs(:valid?).returns(true)
|
||||
#post :create
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
ENV["RAILS_ENV"] ||= 'test'
|
||||
require File.dirname(__FILE__) + "/../config/environment" unless defined?(Rails)
|
||||
require 'rspec/rails'
|
||||
include Devise::TestHelpers
|
||||
|
||||
# Requires supporting files with custom matchers and macros, etc,
|
||||
# in ./support/ and its subdirectories.
|
||||
|
|
|
|||
Loading…
Reference in a new issue