diff options
author | Joe Sak <joe@joesak.com> | 2011-02-24 22:14:35 -0600 |
---|---|---|
committer | Joe Sak <joe@joesak.com> | 2011-02-24 22:14:35 -0600 |
commit | d23c10db7029cbcfd168d0ced50a72957d1fad8a (patch) | |
tree | 1940a2587bf8a072195ed71f931d2fc6c5282068 /features | |
parent | 518ee00e0c5d7c8a18e1c58dc00f58d6974d9f06 (diff) | |
download | refinerycms-blog-d23c10db7029cbcfd168d0ced50a72957d1fad8a.tar.gz refinerycms-blog-d23c10db7029cbcfd168d0ced50a72957d1fad8a.tar.bz2 refinerycms-blog-d23c10db7029cbcfd168d0ced50a72957d1fad8a.zip |
A little refactor and language change due to core auth steps & factories
Diffstat (limited to 'features')
-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 |