From d23c10db7029cbcfd168d0ced50a72957d1fad8a Mon Sep 17 00:00:00 2001 From: Joe Sak Date: Thu, 24 Feb 2011 22:14:35 -0600 Subject: A little refactor and language change due to core auth steps & factories --- features/authors.feature | 4 ++-- features/support/step_definitions/authors_steps.rb | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'features') diff --git a/features/authors.feature b/features/authors.feature index a28d9ff..7c7df8f 100644 --- a/features/authors.feature +++ b/features/authors.feature @@ -7,8 +7,8 @@ Feature: Blog Post Authors When I am on the new blog post form And I fill in "Title" with "This is my blog post" - And I fill in "Body" with "And I am hubble" + And I fill in "Body" with "And I love it" And I press "Save" Then there should be 1 blog post - And the blog post should belong to "hubble" \ No newline at end of file + And the blog post should belong to me \ No newline at end of file diff --git a/features/support/step_definitions/authors_steps.rb b/features/support/step_definitions/authors_steps.rb index 7dd30ac..e97287e 100644 --- a/features/support/step_definitions/authors_steps.rb +++ b/features/support/step_definitions/authors_steps.rb @@ -1,11 +1,7 @@ -Given /^there is a user named "([^\"]*)"$/ do |login| - @user = Factory.create(:user, :login => login) -end - Then /^there should be (\d+) blog posts?$/ do |num| BlogPost.all.size == num end -Then /^the blog post should belong to "([^\"]*)"$/ do |login| - BlogPost.first.author.login == login +Then /^the blog post should belong to me$/ + BlogPost.first.author.login == User.last.login end \ No newline at end of file -- cgit v1.2.3