Sha256: 6df3c6053dc8bf3fce2493096cc437ebbef351a5ef69b4ac0d79e36336734cb6

Contents?: true

Size: 512 Bytes

Versions: 2

Compression:

Stored size: 512 Bytes

Contents

require 'test_helper'

class DependentTest < ActiveSupport::TestCase
 
  setup do
    Fabricators.define do
      fabricator :user do
        name 'name'
        email { "#{name}@example.com" }
      end
    end
  end
 
  test "return attributes" do
    assert_equal 'name@example.com', attributes_for(:user)[:email]
  end
 
  test "build instance" do
    assert_equal 'name@example.com', build(:user).email
  end
 
  test "create instance" do
    assert_equal 'name@example.com', create(:user).email
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fabricators-0.0.4 test/dependent_test.rb
fabricators-0.0.1 test/dependent_test.rb