Created
June 24, 2011 20:15
-
-
Save jedschneider/1045585 to your computer and use it in GitHub Desktop.
partial_date_spec.rb
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
| require 'spec_helper' | |
| RSpec::Matchers.define :be_included_in do |expected| | |
| match do |actual| | |
| actual.send(:includes?, expected) # => range.includes?("05-15") | |
| end | |
| end | |
| describe PartialDateRange do | |
| describe "a range that wraps the year end from 05-14 to 04-30" do | |
| subject { PartialDateRange.new("05-14", "04-30") } | |
| specify { should contain_the_date("05-15") } | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment