Sha256: b6b1fe97e6a020cc697801684b23a8e943895e3e020505eab4301e5c33325083

Contents?: true

Size: 640 Bytes

Versions: 6

Compression:

Stored size: 640 Bytes

Contents

# vim:fileencoding=utf-8

module SpecSupport
  module AuthorMapperHelper
    def random_author
      author_mapping.keys.send(RUBY_VERSION < '1.9' ? :choice : :sample)
    end

    AUTHOR_MAPPING = {
      'jd' => {
        name: 'Jane Doe',
        email: 'jane@awesome.biz'
      },
      'fb' => {
        name: 'Frances Bar',
        email: 'frances@awesometown.me'
      },
      'qx' => {
        name: 'Quincy Xavier',
        email: 'qx@awesometown.me'
      },
      'hb' => {
        name: 'Hampton Bones',
        email: 'h.bones@awesometown.me'
      }
    }

    def author_mapping
      AUTHOR_MAPPING.clone
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
git-duet-0.5.1 spec/support/author_mapper_helper.rb
git-duet-0.5.0 spec/support/author_mapper_helper.rb
git-duet-0.4.1 spec/support/author_mapper_helper.rb
git-duet-0.4.0 spec/support/author_mapper_helper.rb
git-duet-0.3.0 spec/support/author_mapper_helper.rb
git-duet-0.2.0 spec/support/author_mapper_helper.rb