diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-17 21:05:10 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-19 21:47:38 -0300 |
commit | 29aff93dc4453cbe4c4cfa9e9c3dcf50338a6171 (patch) | |
tree | a7455df694c5d30c59e16e166db93828eb46a3dc /railties/test/application/rake | |
parent | 9c5c0bcfa6d81d45ef091dc8740623faa5e19784 (diff) | |
download | rails-29aff93dc4453cbe4c4cfa9e9c3dcf50338a6171.tar.gz rails-29aff93dc4453cbe4c4cfa9e9c3dcf50338a6171.tar.bz2 rails-29aff93dc4453cbe4c4cfa9e9c3dcf50338a6171.zip |
Move booting/loading tasks setup to the rake notes helper method
Diffstat (limited to 'railties/test/application/rake')
-rw-r--r-- | railties/test/application/rake/notes_test.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/railties/test/application/rake/notes_test.rb b/railties/test/application/rake/notes_test.rb index 23eb4c9939..5a104e2ffe 100644 --- a/railties/test/application/rake/notes_test.rb +++ b/railties/test/application/rake/notes_test.rb @@ -28,9 +28,6 @@ module ApplicationTests app_file 'config/locales/en.yaml', '# TODO: note in yaml' app_file "app/views/home/index.ruby", "# TODO: note in ruby" - boot_rails - load_tasks - run_rake_notes do |output, lines| assert_match(/note in erb/, output) assert_match(/note in js/, output) @@ -58,9 +55,6 @@ module ApplicationTests app_file "some_other_dir/blah.rb", "# TODO: note in some_other directory" - boot_rails - load_tasks - run_rake_notes do |output, lines| assert_match(/note in app directory/, output) assert_match(/note in config directory/, output) @@ -86,9 +80,6 @@ module ApplicationTests app_file "some_other_dir/blah.rb", "# TODO: note in some_other directory" - boot_rails - load_tasks - run_rake_notes "SOURCE_ANNOTATION_DIRECTORIES='some_other_dir' bundle exec rake notes" do |output, lines| assert_match(/note in app directory/, output) assert_match(/note in config directory/, output) @@ -120,9 +111,6 @@ module ApplicationTests end EOS - boot_rails - load_tasks - run_rake_notes "bundle exec rake notes_custom" do |output, lines| assert_match(/\[FIXME\] note in lib directory/, output) assert_match(/\[TODO\] note in test directory/, output) @@ -142,9 +130,6 @@ module ApplicationTests app_file "app/assets/stylesheets/application.css.scss", "// TODO: note in scss" app_file "app/assets/stylesheets/application.css.sass", "// TODO: note in sass" - boot_rails - load_tasks - run_rake_notes do |output, lines| assert_match(/note in scss/, output) assert_match(/note in sass/, output) @@ -155,6 +140,9 @@ module ApplicationTests private def run_rake_notes(command = 'bundle exec rake notes') + boot_rails + load_tasks + Dir.chdir(app_path) do output = `#{command}` lines = output.scan(/\[([0-9\s]+)\]\s/).flatten |