lib/bolt_spec/plans/action_stubs.rb
# Used to create a valid Bolt::Result object from result data.
Used to create a valid Bolt::Result object from result data.
Used to create a valid Bolt :: Result object from result data .
def default_for(target)
        case @data[:default]
        when Bolt::PlanFailure
           raise Bolt::PlanFailure errors so that the PAL can catch them and wrap
           them into Bolt::PlanResult's for us.
          raise @data[:default]
        when Bolt::Error
          Bolt::Result.from_exception(target, @data[:default])
        when Hash
          result_for(target, Bolt::Util.walk_keys(@data[:default], &:to_sym))
        else
          raise 'Default result must be a Hash'
        end
      end
def default_for ( target ) case @data [ :default ] when Bolt :: PlanFailure raise @data [ :default ] when Bolt :: Error Bolt :: Result . from_exception ( target , @data [ :default ] ) when Hash result_for ( target , Bolt :: Util . walk_keys ( @data [ :default ] , & :to_sym ) ) else raise 'Default result must be a Hash' end end
Used to create a valid Bolt::Result object from result data.
Used to create a valid Bolt :: Result object from result data .
# Bolt::PlanFailure needs to be declared before Bolt::Error because # Bolt::PlanFailure is an instance of Bolt::Error, so it can match both # in this case we need to treat Bolt::PlanFailure's in a different way # # raise Bolt::PlanFailure errors so that the PAL can catch them and wrap # them into Bolt::PlanResult's for us.
target
<not_specific>