# encoding: utf-8 describe "$ policy new", :sandbox, :capture do let(:argv) { %w(foo) } before { try_in_sandbox { `policy new #{ argv.join(" ") }` } } it "runs a scaffolder" do %w( app/policies/foo.rb config/locales/policies/foo/en.yml config/locales/policies/foo/ru.yml spec/tests/policies/foo_spec.rb ).each { |file| expect(file).to be_present_in_sandbox } end end # describe $ policy new