Skip to content

Commit 75cf803

Browse files
committed
Add Rails 8 authentication generator
1 parent 8a59436 commit 75cf803

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
require "generators/factory_bot"
2+
require "factory_bot_rails"
3+
4+
module FactoryBot
5+
module Generators
6+
class AuthenticationGenerator < Base
7+
def create_fixture_file
8+
template 'users.rb', 'test/factories/users.rb'
9+
end
10+
end
11+
end
12+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FactoryBot.define do
2+
factory :user do
3+
email_address { "[email protected]" }
4+
password_digest { "MyString" }
5+
end
6+
end

0 commit comments

Comments
 (0)