Sha256: c7e540b2663fcdce9a05fce3118a6af602e7c9e80a1dcbc98a6212f9e8ce50a1

Contents?: true

Size: 675 Bytes

Versions: 1

Compression:

Stored size: 675 Bytes

Contents

require 'test_helper'

class MergesTest < ActiveSupport::TestCase

  setup do
    Fabricators.define do
      fabricator :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

1 entries across 1 versions & 1 rubygems

Version Path
fabricators-0.0.1 test/merges_test.rb