From cd6bc7c64854fb3d7608101f95f73fd60a4db4fe Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Sat, 1 Oct 2016 17:18:52 -0500 Subject: [PATCH] Add universes to content feature tests --- features/content.feature | 2 ++ features/step_definitions/steps.rb | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/features/content.feature b/features/content.feature index 6d83b631..2e35c417 100644 --- a/features/content.feature +++ b/features/content.feature @@ -15,6 +15,7 @@ Feature: Character sheets | character | | location | | item | + | universe | Scenario Outline: I change my content's name Given I have created a @@ -26,3 +27,4 @@ Feature: Character sheets | character | | location | | item | + | universe | diff --git a/features/step_definitions/steps.rb b/features/step_definitions/steps.rb index 2340a0b8..0d6d71c5 100644 --- a/features/step_definitions/steps.rb +++ b/features/step_definitions/steps.rb @@ -7,21 +7,21 @@ When 'I am logged-in' do click_button 'Log in' end -When /^I create a (character|location|item)$/ do |model| +When /^I create a (character|location|item|universe)$/ do |model| visit new_polymorphic_path(model) fill_in "#{model}_name", with: 'My new content' click_on "Create #{model.titlecase}" end -Then /^that (character|location|item) should be saved$/ do |model| +Then /^that (character|location|item|universe) should be saved$/ do |model| expect(@user.send(model.pluralize).length).to eq(1) end -Given /^I have created a (character|location|item)$/ do |model| +Given /^I have created a (character|location|item|universe)$/ do |model| @model = create(model.to_sym, user: @user) end -When /^I change my (character|location|item)\'s name$/ do |model| +When /^I change my (character|location|item|universe)\'s name$/ do |model| visit polymorphic_path(@model) click_on "Edit this #{model}" fill_in "#{model}_name", with: 'My changed name'