Sha256: 03d517560f351edf699d17543c0a88cef7fc17bbe00c56fbe1ddaa080fb27e91

Contents?: true

Size: 657 Bytes

Versions: 2

Compression:

Stored size: 657 Bytes

Contents

require 'test_helper'

class MergesTest < ActiveSupport::TestCase

  setup do
    Makers.define do
      maker :user do
        name 'name'
      end
    end
  end

  test 'return attributes' do
    assert_equal 'other', attributes_for(:user, name: 'other')[:name]
  end

  test 'build instance' do
    assert_equal 'other', build(:user, name: 'other').name
    build(:user, 3, name: 'other').each do |user|
      assert_equal 'other', user.name
    end
  end

  test 'create instance' do
    assert_equal 'other', create(:user, name: 'other').name
    create(:user, 3, name: 'other').each do |user|
      assert_equal 'other', user.name
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
makers-0.1.3 test/merges_test.rb
makers-0.1.2 test/merges_test.rb