buildr with rails application -


i have project 4 modules. modules java based except 1 that's rails application.

in order automate build process i'm using buildr. i'd run rails tests using "buildr test" (same way execute java tests), can't figure out how execute rake task available in rails project.

any idea how this?

there few ways , depends on how "integrated" want get. typically have our rails applications report test results out via ci_reporter can picked jenkins. 1 of our projects uses code itest.rb snippet like

workspace_dir = file.expand_path(file.dirname(__file__) + '/..')  require file.expand_path("#{workspace_dir}/lib/itest.rb")  itest::config.reports_dir = "#{workspace_dir}/target/reports" itest::config.scripts_dir = "#{workspace_dir}/target" itest::testtask.new('models', filelist["#{workspace_dir}/test/unit/**/*_test.rb"]) itest::testtask.new('controllers', filelist["#{workspace_dir}/test/functional/**/*_test.rb"])  def add_tests_task(project, task_name)   project.test     begin       task(task_name).invoke     rescue       raise unless buildr.options.test == :all     end   end end 

and in our buildfile add like

project 'myproject'   ...   add_tests_task(project, 'test:models')   add_tests_task(project, 'test:controllers') end 

hope helps!


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -