Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/solidus_dev_support/templates/extension/bin/sandbox.tt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ echo "~~~> Removing the old sandbox"
rm -rf ./sandbox

echo "~~~> Creating a pristine Rails app"
rails new sandbox \
rails_version=`bundle exec ruby -e'require "rails"; puts Rails.version'`
rails _${rails_version}_ new sandbox \
--database="${DB:-sqlite3}" \
--skip-git \
--skip-keeps \
Expand Down
6 changes: 1 addition & 5 deletions spec/features/create_extension_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,9 @@ def check_create_extension

def check_bundle_install
cd(install_path) do
open('Gemfile', 'a') { |f| f.puts "gem 'solidus_dev_support', path: '../../..'" }
open('Gemfile', 'a') { |f| f.puts "gem 'solidus_dev_support', path: '../..'" }
end

expect { bundle_install }.to raise_error(command_failed_error, /invalid gemspec/)

# Update gemspec with the required fields
gemspec_path = install_path.join(gemspec_name)
gemspec = gemspec_path.read.lines
Expand Down Expand Up @@ -139,9 +137,7 @@ def check_run_specs

def check_sandbox
cd(install_path) do
# rubocop:disable Lint/InterpolationCheck
command = 'bin/rails-sandbox runner "puts %{The version of SolidusTestExtension is #{SolidusTestExtension::VERSION}}"'
# rubocop:enable Lint/InterpolationCheck

first_run_output = sh(command)
expect(first_run_output).to include("Creating the sandbox app...")
Expand Down