Skip to content

Commit

Permalink
feat(vscode): copy files
Browse files Browse the repository at this point in the history
  • Loading branch information
gmq committed Nov 18, 2022
1 parent 416ec3a commit 2094366
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/potassium/recipes/editorconfig.rb
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions spec/features/editorconfig_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2094366

Please sign in to comment.