diff options
author | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2019-07-18 07:17:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-18 07:17:47 +0900 |
commit | c5a24c8ebba543687c11f893584618a20316fe34 (patch) | |
tree | 4e458dfd22e1830d1ff8ff17367ccaf49e4a998f /railties/test/application | |
parent | 8d967534de4df1a5e487c0ff2f948e138fd883cb (diff) | |
parent | 6fec4c3a0aea3ef783372c55aff6d3c1efd89c4e (diff) | |
download | rails-c5a24c8ebba543687c11f893584618a20316fe34.tar.gz rails-c5a24c8ebba543687c11f893584618a20316fe34.tar.bz2 rails-c5a24c8ebba543687c11f893584618a20316fe34.zip |
Merge pull request #36603 from y-yagi/add_skip_collision_check_option
Add `skip-collision-check` option to generator
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/generators_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index e5e557d204..8ec26db772 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -198,5 +198,15 @@ module ApplicationTests assert_no_match "active_record:migration", output end end + + test "skip collision check" do + rails("generate", "model", "post", "title:string") + + output = rails("generate", "model", "post", "title:string", "body:string") + assert_match(/The name 'Post' is either already used in your application or reserved/, output) + + output = rails("generate", "model", "post", "title:string", "body:string", "--skip-collision-check") + assert_no_match(/The name 'Post' is either already used in your application or reserved/, output) + end end end |