Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require File.dirname(__FILE__) + '/../spec_helper'
- describe AnimeRequest do
- before do
- # Anime.destroy_all
- # AnimeRequest.destroy_all
- @anime = Factory(:anime)
- @anime_request = Factory(:anime_request)
- end
- it "should be allowed to request" do
- Factory.build(:anime_request).should be_valid
- end
- it "should be allowed to update" do
- @anime_request.should be_valid
- end
- it "should not be allowed to request anime, because the request already exists" do
- AnimeRequest.new(:name => @anime_request.name).should_not be_valid
- end
- it "should not be be allowed to request, because the anime already exists" do
- AnimeRequest.new(:name => @anime.name).should_not be_valid
- end
- end
Add Comment
Please, Sign In to add comment