Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:SciMed/temptd

  • Loading branch information...
commit ac7b548affdeee862fdbc15774279813c44ced26 2 parents 3395d75 + 010bd3f
Derick Hitchcock authored
Showing with 22 additions and 6 deletions.
  1. +5 −5 config/database.yml.example
  2. +17 −1 spec/models/event_spec.rb
View
10 config/database.yml.example
@@ -1,18 +1,18 @@
development:
adapter: mysql2
database: temptd_development
- username: the_user
- password: the_password
+ username: root
+ password:
host: localhost
# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test: &test
- adapter: mysql
+ adapter: mysql2
database: temptd_test
- username: the_user
- password: the_password
+ username: root
+ password:
host: localhost
cucumber:
View
18 spec/models/event_spec.rb
@@ -1,7 +1,23 @@
require 'spec_helper'
+before :all do
+
+ vote1 = Vote.new
+ vote2 = Vote.new
+ vote3 = Vote.new
+ timeslot1 = Timeslot.new
+ timeslot2 = Timeslot.new
+ event = Event.new(timeslots: [timeslot1, timeslot2])
+end
describe Event do
-
+ it "calculates the most popular time" do
+ timeslot1.votes = [vote1, vote2]
+ timeslot2.vote = vote3
+ event.calculate_event_time.should_be timeslot2
+
+ end
+
+end
it "should calculate_event_time" do
end
Please sign in to comment.
Something went wrong with that request. Please try again.