Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

added event_spec w/one test #22

Merged
merged 2 commits into from

2 participants

maggieee Sarah Allen
maggieee

I added a test for validation of the presence of an event title. (Relates to Issue #10)

This involved creating the spec/models/event_spec.rb file.

Sarah Allen
Owner

Yay tests!

Sarah Allen ultrasaurus reopened this
Sarah Allen ultrasaurus merged commit e042e44 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 0 deletions.
  1. +13 −0 spec/models/event_spec.rb
13 spec/models/event_spec.rb
View
@@ -0,0 +1,13 @@
+require 'spec_helper'
+
+describe Event do
+ it "must have a title" do
+ event = Factory.build(:event, :title => nil)
+ event.should_not be_valid
+ end
+
+ it "must have a date" do
+ event = Factory.build(:event, :date => nil)
+ event.should_not be_valid
+ end
+end
Something went wrong with that request. Please try again.