Skip to content

Commit

Permalink
WIP- just stuck on the uninitialized Constant weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
joemsak committed Feb 25, 2011
1 parent 6a3cf5d commit 518ee00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions features/authors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ Feature: Blog Post Authors
current_user is assumed through admin screens

Scenario: Saving a blog post in blog_posts#new associates the current_user as the author
Given there is a user named "hubble"
And I am logged in as "hubble"
Given I am a logged in refinery user

When I am on the new blog post form
And I fill in "Title" with "This is my blog post"
Expand Down
4 changes: 2 additions & 2 deletions features/support/step_definitions/authors_steps.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Given /^there is a user named "([^\"]*)"$/ do |login|
@user = Factory.create(:user, :login => login, :password => "#{login}-123", :password_confirmation => "#{login}-123")
@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.last.author.login == login
BlogPost.first.author.login == login
end
2 changes: 1 addition & 1 deletion spec/models/blog_posts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

describe "authors" do
it "are authored" do
BlogPost.new.methods.should include(:author)
BlogPost.instance_methods.map(&:to_sym).include? :author
end
end

Expand Down

0 comments on commit 518ee00

Please sign in to comment.