Sha256: 09b27fab8d6c59e75c9026ed6b81693743f19cb015ff9eafc6e7298b1aace685
Contents?: true
Size: 597 Bytes
Versions: 3
Compression:
Stored size: 597 Bytes
Contents
require 'spec_helper' describe Clearance::Testing::Helpers do class TestClass include Clearance::Testing::Helpers def initialize @controller = Controller.new end class Controller def sign_in(user); end end end describe '#sign_in' do it 'creates an instance of the clearance user model with FactoryGirl' do MyUserModel = Class.new FactoryGirl.stubs(:create) Clearance.configuration.stubs(user_model: MyUserModel) TestClass.new.sign_in expect(FactoryGirl).to have_received(:create).with(:my_user_model) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
clearance-1.3.0 | spec/clearance/testing/helpers_spec.rb |
clearance-1.2.1 | spec/clearance/testing/helpers_spec.rb |
clearance-1.2.0 | spec/clearance/testing/helpers_spec.rb |