diff options
-rw-r--r-- | features/authors.feature | 4 | ||||
-rw-r--r-- | features/support/step_definitions/authors_steps.rb | 8 |
2 files changed, 4 insertions, 8 deletions
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 |