Sha256: d1ddb37ce27659cf424bbe371d3a712e4c71af7f311d1fe80337f31a86679e1c

Contents?: true

Size: 629 Bytes

Versions: 3

Compression:

Stored size: 629 Bytes

Contents

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

    def 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'
        }
      }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
git-duet-0.1.3 spec/support/author_mapper_helper.rb
git-duet-0.1.2 spec/support/author_mapper_helper.rb
git-duet-0.1.1 spec/support/author_mapper_helper.rb