Sha256: 6bb5877d38c870b2b313bfc8f3e88488e6e4525d41f57da8ce8eebe24ddc732d

Contents?: true

Size: 1015 Bytes

Versions: 25

Compression:

Stored size: 1015 Bytes

Contents

require 'hobo_support/module'

module HoboSupport
  CommonTasks = classy_module do

namespace :test do
  desc "Run the irt tests"
  task :irt => :prepare_testapp do |t|
    chdir TESTAPP_PATH
    sh %(irt #{File.expand_path('.',GEM_ROOT)})
  end

  desc "Prepare a rails application for testing"
  task :prepare_testapp, :force do |t, args|
    if args.force || !File.directory?(TESTAPP_PATH)
      remove_entry_secure( TESTAPP_PATH, true )
      sh %(#{BIN} new #{TESTAPP_PATH} --skip-wizard)
      chdir TESTAPP_PATH
      sh %(echo "gem 'irt', :group => :console" >> Gemfile) # to make the bundler happy
      sh %(echo "" > app/models/.gitignore) # because git reset --hard would rm the dir
      rm %(.gitignore) # we need to reset everything in a testapp
      sh %(git init && git add . && git commit -m "initial commit")
      puts %(The testapp has been created in '#{TESTAPP_PATH}')
    else
      chdir TESTAPP_PATH
      sh %(git add .)
      sh %(git reset --hard -q HEAD)
    end
  end
end

  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hobo_support-1.3.3 lib/hobo_support/common_tasks.rb
hobo_support-1.3.2 lib/hobo_support/common_tasks.rb
hobo_support-1.3.1 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.RC4 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.RC3 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.RC2 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.RC1 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.RC lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre31 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre29 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre28 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre27 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre26 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre25 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre24 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre23 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre22 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre21 lib/hobo_support/common_tasks.rb
hobo_support-1.3.0.pre20 lib/hobo_support/common_tasks.rb