Skip to content

Commit

Permalink
adds acceptance test for ruby file: "" syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
tisba committed Feb 13, 2024
1 parent 91f58e4 commit e857380
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions spec/acceptance/appraisals_file_bundler_dsl_compatibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,33 @@
gemspec :path => "../sitepress"
Gemfile
end

it 'supports ruby file: ".ruby-version" DSL' do
build_gemfile <<-Gemfile
source 'https://rubygems.org'
ruby RUBY_VERSION
gem 'appraisal', :path => #{PROJECT_ROOT.inspect}
Gemfile

build_appraisal_file <<-Appraisals
appraise 'ruby-version' do
ruby file: ".ruby-version"
end
Appraisals

run 'bundle install --local'
run 'appraisal generate'

expect(content_of 'gemfiles/ruby_version.gemfile').to eq <<-Gemfile.strip_heredoc
# This file was generated by Appraisal
source "https://rubygems.org"
ruby({:file=>".ruby-version"})
gem "appraisal", :path => #{PROJECT_ROOT.inspect}
Gemfile
end
end

0 comments on commit e857380

Please sign in to comment.