Sha256: 13270c6ea2d515b77cd6f5ee7ec43de125fe55931d7790593d440c0262a2f644

Contents?: true

Size: 492 Bytes

Versions: 2

Compression:

Stored size: 492 Bytes

Contents

require 'test_helper'

class AliasesTest < ActiveSupport::TestCase

  setup do
    Fabricators.define do
      fabricator :user, aliases: [:owner, :author] do
        name 'name'
        phone
      end
    end
  end

  test 'aliases' do
    assert_kind_of Fabricators::Fabricator, Fabricators.definitions.find(:user)
    assert_kind_of Fabricators::Fabricator, Fabricators.definitions.find(:owner)
    assert_kind_of Fabricators::Fabricator, Fabricators.definitions.find(:author)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fabricators-0.1.2 test/aliases_test.rb
fabricators-0.1.1 test/aliases_test.rb