Permalink
Browse files

Merge branch 'master' into fix-require-paths

  • Loading branch information...
2 parents e18cd0d + dabc367 commit 09e00ef469053ddc8aff64fb461345ff38d58937 @justincampbell justincampbell committed May 2, 2012
@@ -9,10 +9,6 @@ def application
cap.application
end
- def application_name
- cap.application.titleize
- end
-
def branch
cap.branch
end
@@ -36,7 +36,7 @@ def perform
def body
<<-BODY.gsub(/^ {6}/, '')
#{user_name} deployed
- #{application_name} branch
+ #{application.titleize} branch
#{branch} to
#{stage} on
#{now.strftime("%m/%d/%Y")} at
@@ -80,7 +80,7 @@ def notify_method
end
def subject
- "#{application} branch #{branch} deployed to #{stage}"
+ "#{application.titleize} branch #{branch} deployed to #{stage}"
end
def text
@@ -34,6 +34,10 @@
it { subject.send(:from).should == 'sender@example.com' }
it { subject.send(:to).should == 'example@example.com' }
+ it "creates a subject" do
+ subject.send(:subject).should == "Example branch master deployed to test"
+ end
+
it "renders a plaintext email" do
subject.send(:body).should == <<-BODY.gsub(/^ {6}/, '')
John Doe deployed
@@ -73,4 +73,16 @@
it { subject.send(:with).should == "1|g" }
end
+
+ context "with an uppercase application" do
+ before :each do
+ configuration.load do
+ set :application, 'Example'
+ end
+
+ it "lowercases the application" do
+ subject.send(:packet).should == "example.deploy:1|c"
+ end
+ end
+ end
end

0 comments on commit 09e00ef

Please sign in to comment.