-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b074e46
commit f55a1d6
Showing
1 changed file
with
0 additions
and
23 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -21,29 +21,6 @@ class SetupGeneratorTest < Rails::Generators::TestCase | |
end | ||
end | ||
|
||
test "creates dev:prime task" do | ||
expected = <<~RUBY | ||
if Rails.env.development? || Rails.env.test? | ||
require "factory_bot" if Bundler.rubygems.find_name("factory_bot_rails").any? | ||
namespace :dev do | ||
desc "Sample data for local development environment" | ||
task prime: "db:setup" do | ||
include FactoryBot::Syntax::Methods if Bundler.rubygems.find_name("factory_bot_rails").any? | ||
# create(:user, email: "[email protected]", password: "password") | ||
end | ||
end | ||
end | ||
RUBY | ||
|
||
run_generator | ||
|
||
assert_file app_root("lib/tasks/dev.rake") do |file| | ||
assert_equal expected, file | ||
end | ||
end | ||
|
||
test "has a custom description" do | ||
assert_no_match(/Description:/, generator_class.desc) | ||
end | ||
|