Skip to content

Commit

Permalink
Merge pull request #4 from esigler/add_more_mealnames
Browse files Browse the repository at this point in the history
[feature] Add more meal names as aliases to today command
  • Loading branch information
esigler committed Mar 23, 2016
2 parents 7d6acdc + 583fd76 commit e3d7438
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/lita/handlers/zerocater.rb
Expand Up @@ -31,7 +31,7 @@ class Zerocater < Handler
)

route(
/^lunch$/i,
/^(breakfast|brunch|lunch|dinner)$/i,
:today,
command: true,
help: {
Expand Down
2 changes: 1 addition & 1 deletion locales/en.yml
Expand Up @@ -4,7 +4,7 @@ en:
zerocater:
help:
lunch:
syntax: lunch
syntax: (breakfast|brunch|lunch|dinner)
desc: Show today's Zerocater menu for all locations
today:
syntax: zerocater today
Expand Down
3 changes: 3 additions & 0 deletions spec/lita/handlers/zerocater_spec.rb
Expand Up @@ -8,8 +8,11 @@
it { is_expected.to route_command('zerocater today').to(:today) }
it { is_expected.to route_command('zerocater tomorrow').to(:tomorrow) }
it { is_expected.to route_command('zerocater yesterday').to(:yesterday) }
it { is_expected.to route_command('breakfast').to(:today) }
it { is_expected.to route_command('brunch').to(:today) }
it { is_expected.to route_command('lunch').to(:today) }
it { is_expected.to route_command('Lunch').to(:today) }
it { is_expected.to route_command('dinner').to(:today) }

let(:menu) do
File.read('spec/files/meals.json')
Expand Down

0 comments on commit e3d7438

Please sign in to comment.