Skip to content

Commit d02696e

Browse files
authored
Merge pull request #223 from mamhoff/fix-gemspec-error
Fix(specs): Correct path for gem in spec
2 parents fc9b4f3 + da8880e commit d02696e

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

lib/solidus_dev_support/templates/extension/bin/sandbox.tt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ echo "~~~> Removing the old sandbox"
3030
rm -rf ./sandbox
3131

3232
echo "~~~> Creating a pristine Rails app"
33-
rails new sandbox \
33+
rails_version=`bundle exec ruby -e'require "rails"; puts Rails.version'`
34+
rails _${rails_version}_ new sandbox \
3435
--database="${DB:-sqlite3}" \
3536
--skip-git \
3637
--skip-keeps \

spec/features/create_extension_spec.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,9 @@ def check_create_extension
9696

9797
def check_bundle_install
9898
cd(install_path) do
99-
open('Gemfile', 'a') { |f| f.puts "gem 'solidus_dev_support', path: '../../..'" }
99+
open('Gemfile', 'a') { |f| f.puts "gem 'solidus_dev_support', path: '../..'" }
100100
end
101101

102-
expect { bundle_install }.to raise_error(command_failed_error, /invalid gemspec/)
103-
104102
# Update gemspec with the required fields
105103
gemspec_path = install_path.join(gemspec_name)
106104
gemspec = gemspec_path.read.lines
@@ -139,9 +137,7 @@ def check_run_specs
139137

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

146142
first_run_output = sh(command)
147143
expect(first_run_output).to include("Creating the sandbox app...")

0 commit comments

Comments
 (0)