Hey guys,
I'm running into a problem that I am not quite understanding.
I am using cucumber / capybara to select an option from a dropdown list but it is giving me a failure on the select step.
I have run through these steps in the browser and didn't have any errors. Cucumber also doesn't error if I put the method directly in the view.
I am curious what is making this test fail when I have it implemented this way yet in the browser it works as expected.
Any thoughts are greatly appreciated.
My current code is as follows:
controller:
def new
@discussion = Discussion.new
form_instances
end
def edit
form_instances
end
private
def form_instances
@categories = DiscussionCategory.all.collect{|category| [category.name, category.id]}
end
------
View [lines 15-8]:
<div class="field">
<%= f.label :discussion_category %><br>
<%= f.select :discussion_category_id, @categories, prompt: true %>
</div>
Feature:
Background: starting from the discussion group show page
Given there is a discussion group
And categories for that discussion group
And a user is on the discussion group index page
And clicks on the discussion group link
And the new discussion link is clicked
@discussion
Scenario: creating a valid discussion
And discussion group id is present
And the category is selected
...
Failing step in bold:
Given(/^there is a discussion group$/) do
@discussion_group = FactoryGirl.create :discussion_group
end
Given(/^categories for that discussion group$/) do
@discussion_categories = []
3.times{@discussion_categories << FactoryGirl.create(:discussion_category)}
end
Given(/^clicks on the discussion group link$/) do
click_on @discussion_group.name
end
Given(/^the new discussion link is clicked$/) do
click_on 'create discussion'
end
Given(/^discussion group id is present$/) do
page.find_by_id('discussion_discussion_group_id').value.to_i.should eq @discussion_group.id
end
Given(/^the category is selected$/) do
select @discussion_categories.first.name, from: 'discussion_discussion_category_id'
end
The error I am getting is:
undefined method `empty?' for nil:NilClass (ActionView::Template::Error)
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/tags/select.rb:35:in `grouped_choices?'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/tags/select.rb:19:in `render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/form_options_helper.rb:156:in `select'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/form_options_helper.rb:774:in `select'
./app/views/discussions/_form.html.erb:17:in `block in _app_views_discussions__form_html_erb___3672191014114043450_70171974323000'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/capture_helper.rb:200:in `with_output_buffer'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/capture_helper.rb:38:in `capture'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/form_helper.rb:435:in `form_for'
./app/views/discussions/_form.html.erb:1:in `_app_views_discussions__form_html_erb___3672191014114043450_70171974323000'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/template.rb:143:in `block in render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications.rb:161:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/template.rb:141:in `render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/partial_renderer.rb:306:in `render_partial'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/partial_renderer.rb:279:in `block in render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/partial_renderer.rb:278:in `render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/renderer.rb:47:in `render_partial'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/helpers/rendering_helper.rb:27:in `render'
./app/views/discussions/new.html.erb:3:in `_app_views_discussions_new_html_erb___1038348129427938293_70171926265080'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/template.rb:143:in `block in render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications.rb:161:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/template.rb:141:in `render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:48:in `block in render_template'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:47:in `render_template'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/template_renderer.rb:17:in `render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/renderer.rb:42:in `render_template'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_view/renderer/renderer.rb:23:in `render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:127:in `_render_template'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/streaming.rb:219:in `_render_template'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:120:in `render_to_body'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/rendering.rb:33:in `render_to_body'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/renderers.rb:26:in `render_to_body'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:97:in `render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/rendering.rb:16:in `render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/Users/lovell/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/core_ext/benchmark.rb:12:in `ms'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:41:in `block in render'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.3/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:40:in `render'
./app/controllers/discussions_controller.rb:36:in `block (2 levels) in create'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/mime_responds.rb:191:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/mime_responds.rb:191:in `respond_to'
./app/controllers/discussions_controller.rb:31:in `create'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/abstract_controller/base.rb:189:in `process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/rendering.rb:10:in `process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:413:in `_run__3725951962566406756__process_action__callbacks'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/abstract_controller/callbacks.rb:17:in `process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/notifications.rb:159:in `instrument'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/abstract_controller/base.rb:136:in `process'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:44:in `process'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal.rb:195:in `dispatch'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_controller/metal.rb:231:in `block in action'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:80:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:48:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/journey/router.rb:71:in `block in call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/journey/router.rb:59:in `each'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/journey/router.rb:59:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/routing/route_set.rb:680:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/conditionalget.rb:35:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/flash.rb:241:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/cookies.rb:486:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.3/lib/active_record/query_cache.rb:36:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:373:in `_run__2133552253308051269__call__callbacks'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:80:in `run_callbacks'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/cucumber-rails-1.4.0/lib/cucumber/rails/action_controller.rb:10:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.3/lib/rails/rack/logger.rb:38:in `call_app'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `block in call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `block in tagged'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:25:in `tagged'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/tagged_logging.rb:67:in `tagged'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.3/lib/rails/rack/logger.rb:20:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.3/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.3/lib/action_dispatch/middleware/static.rb:64:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.3/lib/rails/engine.rb:511:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.3/lib/rails/application.rb:97:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-test-0.6.2/lib/rack/mock_session.rb:30:in `request'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-test-0.6.2/lib/rack/test.rb:230:in `process_request'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/rack-test-0.6.2/lib/rack/test.rb:66:in `post'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/rack_test/browser.rb:60:in `process'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/rack_test/browser.rb:35:in `process_and_follow_redirects'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/rack_test/browser.rb:26:in `submit'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/rack_test/form.rb:74:in `submit'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/rack_test/node.rb:56:in `click'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/cucumber-rails-1.4.0/lib/cucumber/rails/capybara/javascript_emulation.rb:16:in `click_with_javascript_emulation'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/node/element.rb:118:in `block in click'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/node/base.rb:81:in `synchronize'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/node/element.rb:118:in `click'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/node/actions.rb:13:in `click_link_or_button'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/session.rb:396:in `block (2 levels) in <class:Session>'
/Users/lovell/.rvm/gems/ruby-2.0.0-p451/gems/capybara-2.2.1/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
./features/step_definitions/creating_a_discussion_steps.rb:35:in `/^the discussion is submitted$/'
features/creating_a_discussion.feature:27:in `When the discussion is submitted'