Hi Guys,

On 5 Apr 2013, at 16:29, Lee Hambley <[email protected]> wrote:

> Hi Drew,
> 
> Typically people don't bother testing their recipes, I'd say there's a rule, 
> as long as you are working on something simple (calling a command, calling a 
> rake task, etc) there's very little that needs to be tested, if you want to 
> write something complicated in Capistrano; you might think about writing (and 
> testing) a rake task, and simply calling that task from Cap, as if you would 
> anywhere else.
> 
> The reason that people don't typically test their Cap recipes is that a) it's 
> difficult (because the testing culture in Ruby wasn't as strong as it is now, 
> when Capistrano was architected), and b) that for the most part, a passing 
> test case in a spec bears little resemblance to the potentially chaotic 
> environment where your code will be executed on the server (with dotfiles, 
> and different versions of software, and etc)

How about setting up a VM as a staging server to test that the recipes do 
deploy as expected?

Best

Paul

> 
> If unsure, and if you identify constraints (Git option support is a source of 
> common pain for us maintainers) - it's sane to do a check first, call out and 
> capture the version number of the software you are using, and check that it's 
> new enough, or trust it to err out before doing any damage if it's something 
> you can trust to be sane.
> 
> Hope that helps.
> 
> Lee Hambley
> --
> http://lee.hambley.name/
> +49 (0) 170 298 5667
> 
> 
> On 5 April 2013 17:19, Drew Sheneman <[email protected]> wrote:
> I am fairly new to Capistrano. I was wondering if there are any resources / 
> tutorials on testing my Capistrano configuration with Rspec? 
> 
> I have seen a few examples using capistrano-spec, however these seem to 
> always be related to testing recipes, whereas I have a very simple setup in 
> my deploy.rb at the moment. 
> 
> Is testing this necessary? Thanks.
> 
> -- 
> -- 
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to 
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> -- 
> -- 
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to 
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to