I have written a cucumber test for a blog application that I am writing (using rails 4 and ruby 2.0). I am having trouble getting my test to select an option in a drop down list.
The test i have is:
Scenario: Creating a valid blog When the subject is filled in And the body is filled in And a category is selected When the form is submitted Then a success notification is presented And a record is written to the database
The test I am having issues with is:
When(/^a category is selected$/) do select 'Personal', from: 'blog_category' end
1 error prohibited this blog from being saved: Category can't be blank
Can anyone tell me if there is another way to select an option in a drop down list? Or somehow see why the select method is not working in capybara?