Sha256: 1373396a334aa0f62f45ab118ffcf388547b09f4eebac024d1feefdea959a57a

Contents?: true

Size: 992 Bytes

Versions: 1

Compression:

Stored size: 992 Bytes

Contents

require "spec_helper"
require "rubocop"

RSpec.describe "A new project" do
  before(:all) do
    drop_dummy_database
    remove_project_directory
    create_dummy_project
  end

  it "is correctly bundled" do
    expect { on_project { `bundle exec rails -v` } }.to_not output.to_stderr
  end

  it "is a valid rubocop project" do
    on_project do
      expect(run_rubocop).to eq(true)
    end
  end

  it "configures rubocop" do
    rubocop_config_file = IO.read("#{project_path}/.rubocop.yml")

    expect(rubocop_config_file).to include("inherit_from")
    expect(rubocop_config_file).to include("style_guides/platanus/ruby.yml")
    expect(rubocop_config_file).to include(".ruby_style.yml")
  end

  it "set custom ruby style file placeholder" do
    expect(File).to exist("#{project_path}/.ruby_style.yml")
  end

  it "configures hound" do
    hound_config_file = IO.read("#{project_path}/.hound.yml")

    expect(hound_config_file).to include("config_file: .ruby_style.yml")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
potassium-2.0.0 spec/features/new_project_spec.rb