Now that we have shaved the yak of generate-puppetfile, it’s time to move my rspec tests to the top of the controlrepo, as discussed on Thursday. To do so, we need to move not just the spec tests, but also the files Rakefile
, .rspec
, .rubocop.yml
, and create a facsimile metadata.json
, and of course, generate a new .fixtures.yml
.
Moving the files is pretty simple. In my controlrepo, I only have a profile
class with tests, so I’m going to take those as-is. We do want to make sure that we start with a clean environment, we don’t want to copy a bunch of fixtures or other temp files. We could use git clean -ffdxn
; if you don’t want to redownload your gems you can manually clean up the relevant directories. Then we can do the file shuffle:
$ git clean -ffdxn Would remove .bundle/ Would remove Gemfile.lock Would remove coverage/ Would remove dist/profile/spec/fixtures/manifests/ Would remove dist/profile/spec/fixtures/modules/ Would remove vendor/ $ rm -fR dist/profile/spec/fixtures/manifests/ dist/profile/spec/fixtures/modules/ $ git mv dist/profile/spec ./ $ git mv dist/profile/{Rakefile,.rspec,.rubocop.yml} ./