Removed to_s formatter from day model.
[billygoat.git] / spec / spec_helper.rb
blob5d1ea9d4acaa3e0aeb57c10a80e741a537b934d9
1 require File.expand_path(File.dirname(__FILE__) + "/../lib/billygoat")
2 $:.unshift(File.expand_path(File.dirname(__FILE__) + '/../vendor/gems/rspec-1.1.0/lib'))
3 require 'spec'
5 class AfterMatcher
6   def initialize(expected)
7     @expected = expected
8   end
10   def matches?(actual)
11     @actual = actual
12     # Satisfy expectation here. Return false or raise an error if it's not met.
13     @actual < @expected
14     true
15   end
17   def failure_message
18     "expected #{@actual.inspect} to after #{@expected.inspect}, but it didn't"
19   end
21   def negative_failure_message
22     "expected #{@actual.inspect} not to after #{@expected.inspect}, but it did"
23   end
24 end
26 def be_after(expected)
27   AfterMatcher.new(expected)
28 end