Created
October 9, 2013 11:11
-
-
Save markfeedly/6899625 to your computer and use it in GitHub Desktop.
I can only conclude that the subject is out of scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Failures: | |
1) Micropost should not be valid when user_id is not present | |
Failure/Error: it { should_not be_valid } | |
expected #<Micropost id: 1, content: "lorem ipsum", user_id: 1, created_at: "2013-10-09 11:10:10", updated_at: "2013-10-09 11:10:10"> not to be valid | |
------------------- | |
describe Micropost do | |
before(:each) {DatabaseCleaner.clean} | |
let(:user) { FactoryGirl.create(:user) } | |
subject { FactoryGirl.create(:micropost, user_id: user.id) } | |
it { should respond_to(:content) } | |
it { should respond_to(:user_id) } | |
describe "should not be valid when user_id is not present" do | |
user_id = nil | |
it { should_not be_valid } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment