Sha256: 2b561df2e9d2d0aa5a4ceb34176fdd40c9127772bedd42c31efdca2da8d921c8

Contents?: true

Size: 1.15 KB

Versions: 14

Compression:

Stored size: 1.15 KB

Contents

require 'spec_helper'

feature 'Suspend a new project with default configuration' do
  scenario 'specs pass' do
    run_suspenders

    Dir.chdir(project_path) do
      Bundler.with_clean_env do
        expect(`rake`).to include('0 failures')
      end
    end
  end

  scenario 'staging config is inherited from production' do
    run_suspenders

    staging_file = IO.read("#{project_path}/config/environments/staging.rb")
    config_stub = "Dummy::Application.configure do"
    expect(staging_file).to match(/^require_relative 'production'/)
    expect(staging_file).to match(/#{config_stub}/), staging_file
  end

  if RUBY_PATCHLEVEL == 0 && RUBY_VERSION >= '2.1.0'
    scenario '.ruby-version does not include patchlevel for Ruby 2.1.0+' do
      run_suspenders

      ruby_version_file = IO.read("#{project_path}/.ruby-version")
      expect(ruby_version_file).to eq "#{RUBY_VERSION}\n"
    end
  else
    scenario '.ruby-version includes patchlevel for all pre-Ruby 2.1.0 versions' do
      run_suspenders

      ruby_version_file = IO.read("#{project_path}/.ruby-version")
      expect(ruby_version_file).to eq "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}\n"
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
suspenders-1.9.3 spec/features/new_project_spec.rb
suspenders-1.9.2 spec/features/new_project_spec.rb
mj-suspenders-0.0.5 spec/features/new_project_spec.rb
mj-suspenders-0.0.4 spec/features/new_project_spec.rb
mj-suspenders-0.0.3 spec/features/new_project_spec.rb
mj-suspenders-0.0.2 spec/features/new_project_spec.rb
mj-suspenders-0.0.1 spec/features/new_project_spec.rb
suspenders-1.9.1 spec/features/new_project_spec.rb
suspenders-1.9.0 spec/features/new_project_spec.rb
os_suspenders-1.8.5 spec/features/new_project_spec.rb
os_suspenders-1.8.4 spec/features/new_project_spec.rb
os_suspenders-1.8.3 spec/features/new_project_spec.rb
os_suspenders-1.8.2 spec/features/new_project_spec.rb
os_suspenders-0.0.1 spec/features/new_project_spec.rb