diff --git a/lib/potassium/recipes/editorconfig.rb b/lib/potassium/recipes/editorconfig.rb index 9bb64add..466ba101 100644 --- a/lib/potassium/recipes/editorconfig.rb +++ b/lib/potassium/recipes/editorconfig.rb @@ -1,5 +1,7 @@ class Recipes::Editorconfig < Rails::AppBuilder def create copy_file '../assets/.editorconfig', '.editorconfig' + copy_file '../assets/.vscode/settings.json', '.vscode/settings.json' + copy_file '../assets/.vscode/extensions.json', '.vscode/extensions.json' end end diff --git a/spec/features/editorconfig_spec.rb b/spec/features/editorconfig_spec.rb new file mode 100644 index 00000000..919350ec --- /dev/null +++ b/spec/features/editorconfig_spec.rb @@ -0,0 +1,19 @@ +require "spec_helper" + +RSpec.describe "EditorConfig" do + let(:conf_files) do + %w{ + settings.json + extensions.json + } + end + + before(:all) do + drop_dummy_database + remove_project_directory + create_dummy_project + end + + it { expect(File.exist?("#{project_path}/.editorconfig")).to be true } + it { expect(Dir.entries("#{project_path}/.vscode")).to include(*conf_files) } +end