Sha256: d646cb44904968357bd56322d2a3c0852df88f7bed2b333c24d5179c338fe8da

Contents?: true

Size: 1.15 KB

Versions: 4

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(`rspec`).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

4 entries across 4 versions & 1 rubygems

Version Path
mj-suspenders-0.0.9 spec/features/new_project_spec.rb
mj-suspenders-0.0.8 spec/features/new_project_spec.rb
mj-suspenders-0.0.7 spec/features/new_project_spec.rb
mj-suspenders-0.0.6 spec/features/new_project_spec.rb