-
-
Save smtlaissezfaire/e4193a685a7f2fc0b4ab to your computer and use it in GitHub Desktop.
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
describe Event do | |
describe "Validations" do | |
before do | |
@publication = Publication.new(:time_zone => "Eastern Time (US & Canada)") | |
@publication.stub!(:find_all_event_by_day_and_slug).and_return([]) | |
@event = Event.new(:publication => @publication, :state => Event::PUBLISHED) | |
end | |
it { @event.should have_valid_associations } | |
it { @event.should validate_presence_of(:title) } | |
it { @event.should validate_presence_of(:short_title) } | |
it { @event.should validate_presence_of(:genre) } | |
it { @event.should_not validate_presence_of(:slug) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment