Sha256: 38f7b572fb33261f9b3ffd49a27fa5154283e66dfd75b1d078f1f112ed79d3b6

Contents?: true

Size: 907 Bytes

Versions: 12

Compression:

Stored size: 907 Bytes

Contents

require 'rails_spec_helper'

# Rails5 doesn't work with Ruby 3.x, Rails 7 doesn't work with Ruby < 2.7.
def default_rails_versions
  if testing_ruby_2?
    if Gem::Requirement.create('>= 2.7') =~ Gem::Version.new(RUBY_VERSION)
      [ 5, 6, 7 ]
    else
      [ 5, 6 ]
    end
  else
    [ 6, 7 ]
  end
end

def rails_versions
  Array(ENV['RAILS_VERSIONS'] || default_rails_versions)
end

describe 'Rails' do
  rails_versions.each do |rails_major_version| # rubocop:disable Metrics/BlockLength
    context "#{rails_major_version}" do
      include_context 'Rails app pg database', "spec/fixtures/rails#{rails_major_version}_users_app" unless use_existing_data?

      it 'runs tests with APPMAP=true' do
        app.prepare_db
        app.run_cmd \
          'bundle exec rake',
          'RAILS_ENV' => 'test',
          'APPMAP' => 'true',
          'TEST_OPTS' => '--verbose'
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
appmap-0.83.4 spec/rails_test_spec.rb
appmap-0.83.3 spec/rails_test_spec.rb
appmap-0.83.2 spec/rails_test_spec.rb
appmap-0.83.1 spec/rails_test_spec.rb
appmap-0.83.0 spec/rails_test_spec.rb
appmap-0.82.0 spec/rails_test_spec.rb
appmap-0.81.1 spec/rails_test_spec.rb
appmap-0.81.0 spec/rails_test_spec.rb
appmap-0.80.2 spec/rails_test_spec.rb
appmap-0.80.1 spec/rails_test_spec.rb
appmap-0.80.0 spec/rails_test_spec.rb
appmap-0.79.0 spec/rails_test_spec.rb