From 7ced28eb68d222e5a74c3d87d6d220540d5c60a0 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Tue, 3 Jun 2014 21:27:58 +0530 Subject: [PATCH] Days with leading zeros --- spec/features/volunteers_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/volunteers_spec.rb b/spec/features/volunteers_spec.rb index 125f4e25..d8c39c60 100644 --- a/spec/features/volunteers_spec.rb +++ b/spec/features/volunteers_spec.rb @@ -25,7 +25,7 @@ feature Conference do set("#{Date.today.strftime('%B')}") page. find('div.nested-fields:nth-of-type(1) select:nth-of-type(3)'). - set("#{Date.today.strftime('%d')}") + set("#{Date.today.strftime('%-d')}") page. find('div.nested-fields:nth-of-type(1) div:nth-of-type(1) textarea'). set('Example Person') @@ -39,7 +39,7 @@ feature Conference do expect(find('div.nested-fields:nth-of-type(1) select:nth-of-type(2)'). value).to eq("#{Date.today.month}") expect(find('div.nested-fields:nth-of-type(1) select:nth-of-type(3)'). - value).to eq("#{Date.today.strftime('%d')}") + value).to eq("#{Date.today.strftime('%-d')}") expect( find('div.nested-fields:nth-of-type(1) div:nth-of-type(1) textarea'). value).to eq('Example Person')