require_relative "../test_helper" class AddOnTest < IntegrationTestCase def test_metrics_add_on run_hoboken(:generate) do bin_path = File.expand_path("../../../bin/hoboken", __FILE__) execute("#{bin_path} add:metrics") assert_file("Gemfile", /flog/, /flay/, /simplecov/) assert_file("tasks/metrics.rake") assert_file("test/test_helper.rb", < <%= javascript_tag :app %> CODE ) end end def test_sprockets_add_on_modular run_hoboken(:generate, type: :modular) do bin_path = File.expand_path("../../../bin/hoboken", __FILE__) execute("#{bin_path} add:sprockets") assert_file("assets/styles.css") assert_file("assets/app.js") assert_file("Gemfile", "sprockets", "uglifier", "yui-compressor") assert_file("tasks/sprockets.rake") assert_file("middleware/sprockets_chain.rb") assert_file("helpers/sprockets.rb") assert_file("app.rb", < <%= javascript_tag :app %> CODE ) end end end