diff --git a/lib/suspenders/generators/lint_generator.rb b/lib/suspenders/generators/lint_generator.rb index 4b897f5d5..cd7cebfd9 100644 --- a/lib/suspenders/generators/lint_generator.rb +++ b/lib/suspenders/generators/lint_generator.rb @@ -2,12 +2,16 @@ module Suspenders class LintGenerator < Generators::Base + def add_standard + gem "standard", group: :development + Bundler.with_unbundled_env { run "bundle install" } + end + def set_up_hound copy_file "hound.yml", ".hound.yml" end def set_up_standard - gem "standard", group: :development prepend_to_file("Rakefile", 'require "standard/rake"') end end diff --git a/spec/suspenders/generators/lint_generator_spec.rb b/spec/suspenders/generators/lint_generator_spec.rb index a7f983ce5..daf1e3aae 100644 --- a/spec/suspenders/generators/lint_generator_spec.rb +++ b/spec/suspenders/generators/lint_generator_spec.rb @@ -8,6 +8,7 @@ expect("Gemfile") .to match_contents(/gem .standard./) + .and have_bundled("install") .and have_no_syntax_error end end