diff options
author | Wei Xie <xieconnect@gmail.com> | 2010-06-06 10:14:09 +0800 |
---|---|---|
committer | Hans de Graaff <hans@degraaff.org> | 2010-07-25 09:08:51 +0200 |
commit | 854029152445e65fa67a59d49721801a8ee654df (patch) | |
tree | 4f489226a6e7e45ed8246f55b6b031a7246b2854 /features/step_definitions/agenda_steps.rb | |
parent | import User data from db:seed (diff) | |
download | council-webapp-854029152445e65fa67a59d49721801a8ee654df.tar.gz council-webapp-854029152445e65fa67a59d49721801a8ee654df.tar.bz2 council-webapp-854029152445e65fa67a59d49721801a8ee654df.zip |
Agenda implemented and tested
Diffstat (limited to 'features/step_definitions/agenda_steps.rb')
-rw-r--r-- | features/step_definitions/agenda_steps.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/features/step_definitions/agenda_steps.rb b/features/step_definitions/agenda_steps.rb new file mode 100644 index 0000000..94a6248 --- /dev/null +++ b/features/step_definitions/agenda_steps.rb @@ -0,0 +1,15 @@ +# agenda creation testing is already covered in other steps. +# let's speed up the test by directly modifying the Model +Given /^agenda "([^\"]*)" exists$/ do |agenda_name| + @agenda = agendas(:agenda_one) + if @agenda.name != agenda_name + @agenda.update_attributes(:name => agenda_name) + end +end + +# avoid repetition in agenda.features +Given /^I visit agendas as a (.+)$/ do |user| + Given "I am logged in as a #{user}" + And 'I am on the home page' + When 'I follow "Agendas"' +end |