lib/simple_auth/rspec.rb in simple_auth-1.5.0 vs lib/simple_auth/rspec.rb in simple_auth-2.0.0
- old
+ new
@@ -12,12 +12,12 @@
# require "simple_auth/rspec"
# RSpec.configure {|c| c.include SimpleAuth::RSpec, :type => :controller}
#
def simple_auth(options = {})
options.reverse_merge!({
- :session => mock("current_session").as_null_object,
+ :session => double("current_session").as_null_object,
:authorized => true,
- :user => mock("current_user").as_null_object
+ :user => double("current_user").as_null_object
})
controller.stub({
:current_user => options[:user],
:authorized? => options[:authorized],