Skip to content

Commit

Permalink
Merge pull request #4981 from solidusio/backport/v3.2/pr-4980
Browse files Browse the repository at this point in the history
[v3.2] Fix rake error testing the update generator
  • Loading branch information
waiting-for-dev authored Mar 16, 2023
2 parents a771feb + ddc8e11 commit 2ea8e9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def order_state_label
let(:order) { create :shipped_order, line_items_count: 2 }

context 'when creating a return with state "Received"' do
it 'marks the order as returned', :js do
it 'marks the order as returned', :js, :flaky do
create_customer_return('receive')

expect(page).to have_content 'Customer Return has been successfully created'
Expand Down
7 changes: 7 additions & 0 deletions core/lib/generators/solidus/update/update_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class UpdateGenerator < ::Rails::Generators::Base
default: 'config/initializers/',
hide: true

class_option :install_migrations,
type: :boolean,
default: true,
hide: true

def create_new_defaults_initializer
previous_version_prompt = options[:previous_version_prompt]
return if previous_version_prompt && !yes?(<<~MSG, :red)
Expand All @@ -58,6 +63,8 @@ def create_new_defaults_initializer
end

def install_migrations
return unless options[:install_migrations]

say_status :copying, "migrations"
rake 'spree:install:migrations'
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Rails::Generators.invoke('solidus:update', [
"--initializer_directory=#{Rails.root.join('tmp')}",
"--previous_version_prompt=false",
"--install_migrations=false",
"--from=#{from}",
"--to=#{to}",
"--quiet"
Expand Down

0 comments on commit 2ea8e9a

Please sign in to comment.