From c76311a2b8a54b57503e61965079d2e50e253e60 Mon Sep 17 00:00:00 2001 From: Karl Matthias Date: Fri, 28 Sep 2012 20:26:21 +0100 Subject: [PATCH] Use more modern rspec syntax for lambda --- spec/capistrano_deploy_tags_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/capistrano_deploy_tags_spec.rb b/spec/capistrano_deploy_tags_spec.rb index 4303208..d3c64f7 100644 --- a/spec/capistrano_deploy_tags_spec.rb +++ b/spec/capistrano_deploy_tags_spec.rb @@ -28,13 +28,13 @@ describe Capistrano::DeployTags do FileUtils.chdir '/tmp' configuration.set(:branch, 'master') configuration.set(:stage, 'test') - lambda { configuration.find_and_execute_task('git:prepare_tree') }.should raise_error('git checkout master failed!') + expect { configuration.find_and_execute_task('git:prepare_tree') }.to raise_error('git checkout master failed!') end context "with a clean git tree" do it "raises an error if :stage or :branch are undefined" do with_clean_repo do - lambda { configuration.find_and_execute_task('git:prepare_tree') }.should raise_error('define :branch and :stage') + expect { configuration.find_and_execute_task('git:prepare_tree') }.to raise_error('define :branch and :stage') end end @@ -42,7 +42,7 @@ describe Capistrano::DeployTags do with_clean_repo do configuration.set(:branch, 'master') configuration.set(:stage, 'test') - lambda { configuration.find_and_execute_task('git:prepare_tree') }.should_not raise_error + expect { configuration.find_and_execute_task('git:prepare_tree') }.to_not raise_error end end end @@ -56,7 +56,7 @@ describe Capistrano::DeployTags do it "does not raise an error when run from a clean tree" do with_clean_repo do - lambda { configuration.find_and_execute_task('git:tagdeploy') }.should_not raise_error + expect { configuration.find_and_execute_task('git:tagdeploy') }.to_not raise_error end end