You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require'rubygems'gem'minitest'require'minitest/autorun'require'capistrano'require'minitest-capistrano'require'capistrano/cli'describe'my_project'dobeforedoENV['TEST']='true'@config=Capistrano::Configuration.new@config.extend(MiniTest::Capistrano::ConfigurationExtension)@config.loadfile: File.expand_path(File.join(File.dirname(__FILE__),'Capfile'))endsubject{MiniTest::Unit::TestCase.new'the test case'}it'does something in production when the task role is production'dotest_environment'do_something_on_production','production'endit'does something in staging when the task role is staging'dotest_environment'do_something_on_staging','staging'endit'does something in staging when the task role is not defined'dotest_environment'do_something','staging'endenddeftest_environment(task,environment)subject.assert_have_tasktask.to_sym,@config@config.find_and_execute_tasktasksubject.assert_have_run"echo #{environment}",@configend
Some gems may not load in the test environment, hence the ENV['test'] and
Thought this could help someone:
Some gems may not load in the test environment, hence the ENV['test'] and
The text was updated successfully, but these errors were encountered: