Sha256: 8155d46ab4fb16c13dd74a503a22ee960a67d2a720aa142fbd31af1672db708f

Contents?: true

Size: 379 Bytes

Versions: 4

Compression:

Stored size: 379 Bytes

Contents

shared_examples_for "every authenticated controller" do
  def mock_user(stubs={})
    @mock_user ||= mock_model(User, stubs).as_null_object
  end
  before(:each) do
    # mock up an authentication in the underlying warden library
    request.env['warden'] = mock(Warden, :authenticate => mock_user,
                                         :authenticate! => mock_user)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fassets_core-0.4.0 lib/fassets_core/test_helper/every_authenticated_controller.rb
fassets_core-0.3.1 lib/fassets_core/test_helper/every_authenticated_controller.rb
fassets_core-0.3.0 lib/fassets_core/test_helper/every_authenticated_controller.rb
fassets_core-0.2.0 lib/fassets_core/test_helper/every_authenticated_controller.rb