-
-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Rails 8 authentication generator
- Loading branch information
1 parent
b2047c1
commit 2a27128
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
lib/generators/factory_bot/authentication/authentication_generator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require "generators/factory_bot" | ||
require "factory_bot_rails" | ||
|
||
module FactoryBot | ||
module Generators | ||
class AuthenticationGenerator < Base | ||
def create_fixture_file | ||
template 'users.rb', 'test/factories/users.rb' | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FactoryBot.define do | ||
factory :user do | ||
email_address { "[email protected]" } | ||
password_digest { "MyString" } | ||
end | ||
end |