Sha256: bb117997a2313e632eb561967fc8bd620ed518d38447a3196b610f081df799ba
Contents?: true
Size: 1.48 KB
Versions: 2
Compression:
Stored size: 1.48 KB
Contents
require 'test_helper' require 'rake' class HerokuDeployTest < Test::Unit::TestCase include Rake context 'Initializing HerokuDeploy::Tasks' do setup do @tasks = HerokuDeploy::Tasks.new( :staging_app => "example-staging", :production_app => "example" ) end teardown do Task.clear end should 'set self as the application-wide jeweler tasks' do assert_same @tasks, Rake.application.heroku_deploy_tasks end context "HerokuDeploy instance" do setup do @heroku_deploy = @tasks.heroku_deploy stub(@heroku_deploy).__double_definition_create__.call(:`) { "" } stub(@heroku_deploy).puts stub(@heroku_deploy).bundle_not_yet_captured? { false } stub(@heroku_deploy).bundle_captured? { true } stub.any_instance_of(HTTParty::Response).code { 422 } end should "assign staging_app" do assert_equal "example-staging", @heroku_deploy.staging_app end should "assign production_app" do assert_equal "example", @heroku_deploy.production_app end should "invoke setup" do @heroku_deploy.setup end should "invoke staging" do @heroku_deploy.staging end should "invoke production" do @heroku_deploy.production end should "invoke backup_staging" do @heroku_deploy.backup_staging end should "invoke backup_production" do @heroku_deploy.backup_production end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
heroku_deploy-0.1.4 | test/heroku_deploy_test.rb |
heroku_deploy-0.1.3 | test/heroku_deploy_test.rb |