Skip to content

Commit

Permalink
Lesson descriptions loaded from the database
Browse files Browse the repository at this point in the history
* TimetabledLesson#description is now implemented and (using planted
  data) tested.
* LessonDescription.find_by_schoolday_and_lesson
* DataMapper::Property::SchoolDay implemented to map SchoolDay objects
  to strings in the database.
* Command::EnterLesson -> DescribeLesson (and implemented)
* At commandline, can run "sr 10 ..." instead of "sr enter 10 ..."
* At commandline, dates can be specified: "sr 10 yesterday ..."
* (Note: commandline code not tested yet, even interactively.)
* Database.current (to support LessonDescription; general use not
  encouraged).
* Database#schoolday!(str) -- raises error if not a schoolday.
  • Loading branch information
gsinclair committed Feb 28, 2012
1 parent 2dbf11e commit ce8bddb
Show file tree
Hide file tree
Showing 8 changed files with 642 additions and 15 deletions.
9 changes: 9 additions & 0 deletions doc/devel-log/2012-02-21-database-timetabled-lessons.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,12 @@ improved the situation by raising an appropriate error message in that
situation. Tests are passing now.

I declare Database#timetabled\_lesson working and am committing the code.

Database#timetabled_lessons tested and working

* Couple of changes to the code of the method itself.
* Lesson and Obstacle got to_s(:brief).
* Error raised if obstacle config contains non-school day.
* TimetabledLesson got to_s, enabling easier testing.
* test/database.rb contains the tests for timetabled_lessons.
* Obstacle config got a new entry with lessons "12(3), 10(2)"
Loading

0 comments on commit ce8bddb

Please sign in to comment.