diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index 7c96b82379ca2dd11602a9244ea18d807d0a002f..70525beea1507b6845589788b3ca3ec104ef8e29 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -31,11 +31,11 @@ class SnippetsController < ApplicationController end def new - @snippet = PersonalSnippet.build + @snippet = PersonalSnippet.new end def create - @snippet = PersonalSnippet.build(params[:personal_snippet]) + @snippet = PersonalSnippet.new(params[:personal_snippet]) @snippet.author = current_user if @snippet.save diff --git a/features/snippets/snippets.feature b/features/snippets/snippets.feature index ebb4a7c07197bbf750c36b32b65e38a282b99c3c..1119defa17dc63fb0ac46717ac03c4d22603dab2 100644 --- a/features/snippets/snippets.feature +++ b/features/snippets/snippets.feature @@ -1,4 +1,4 @@ -Feature: Snippets +Feature: Snippets Feature Background: Given I sign in as a user And I have public "Personal snippet one" snippet diff --git a/features/steps/snippets/snippets.rb b/features/steps/snippets/snippets.rb index 0ab636543a9b9ef2d2c3473bc44a7196b501585d..b185f6057286e5b4e6649f3ddbd1a00443028537 100644 --- a/features/steps/snippets/snippets.rb +++ b/features/steps/snippets/snippets.rb @@ -1,4 +1,4 @@ -class Snippets < Spinach::FeatureSteps +class SnippetsFeature < Spinach::FeatureSteps include SharedAuthentication include SharedPaths include SharedProject