From 7777c1d30e780f5902c2f89b9957ee4fcf4625fa Mon Sep 17 00:00:00 2001 From: Sergio Cambra Date: Fri, 20 Nov 2020 15:44:18 +0100 Subject: [PATCH] fix generators test, thor always report "File unchanged" with -p option --- test/generators_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/generators_test.rb b/test/generators_test.rb index 175340d2..a5d8a9c1 100644 --- a/test/generators_test.rb +++ b/test/generators_test.rb @@ -17,13 +17,14 @@ class GeneratorsTest < ActiveSupport::TestCase test "rails g devise_invitable:install" do @output = `cd #{RAILS_APP_PATH} && rails g devise_invitable:install -p` - assert @output.match(%r{(inject|insert).* config/initializers/devise\.rb\n}) + puts @output + assert @output.match(%r{(inject|insert|File unchanged! The supplied flag value not found!).* config/initializers/devise\.rb\n}) assert @output.match(%r|create.* config/locales/devise_invitable\.en\.yml\n|) end test "rails g devise_invitable Octopussy" do @output = `cd #{RAILS_APP_PATH} && rails g devise_invitable Octopussy -p` - assert @output.match(%r{(inject|insert).* app/models/octopussy\.rb\n}) + assert @output.match(%r{(inject|insert|File unchanged! The supplied flag value not found!).* app/models/octopussy\.rb\n}) assert @output.match(%r|invoke.* #{DEVISE_ORM}\n|) if DEVISE_ORM == :active_record assert @output.match(%r|create.* db/migrate/\d{14}_devise_invitable_add_to_octopussies\.rb\n|)