Sha256: 92217bc1c509dab6441c8cda0e63792779be6fbc94589ec02a3930ff20bb0626
Contents?: true
Size: 779 Bytes
Versions: 4
Compression:
Stored size: 779 Bytes
Contents
require 'warden/test/helpers' require 'warden/github/user' require "warden" module SinatraAuthGithubTestHelper include(Warden::Test::Helpers) Warden.test_mode! def make_user(attrs = {}) User.make(attrs) end class User < Warden::GitHub::User def self.make(attrs = {}) default_attrs = { 'login' => "test_user", 'name' => "Test User", 'email' => "test@example.com", 'company' => "GitHub", 'gravatar_id' => 'a'*32, 'avatar_url' => 'https://a249.e.akamai.net/assets.github.com/images/gravatars/gravatar-140.png?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png' } default_attrs.merge! attrs User.new(default_attrs) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
perkins-0.0.5 | spec/support/auth.rb |
perkins-0.0.3 | spec/support/auth.rb |
perkins-0.0.2 | spec/support/auth.rb |
perkins-0.0.1 | spec/support/auth.rb |