Commit 21a9448b
Changed files (2)
spec
factories
views
tutorials
spec/factories/tutorial.rb
@@ -0,0 +1,10 @@
+FactoryGirl.define do
+ factory :tutorial do
+ heading "blah"
+ description "well hello there"
+ url "http://mokhan.ca/"
+ image_url "http://example.com"
+ author "mo"
+ author_url "mokhan.ca"
+ end
+end
spec/views/tutorials/edit.html.erb_spec.rb
@@ -2,11 +2,7 @@ require 'spec_helper'
describe "tutorials/edit" do
before(:each) do
- @tutorial = assign(:tutorial, stub_model(Tutorial,
- :heading => "MyString",
- :description => "MyText",
- :url => "MyString"
- ))
+ @tutorial = assign(:tutorial, FactoryGirl.build(:tutorial))
end
it "renders the edit tutorial form" do