Skip to content

Instantly share code, notes, and snippets.

@karlosmid
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlosmid/cb9cf09a40031d09de6a to your computer and use it in GitHub Desktop.
Save karlosmid/cb9cf09a40031d09de6a to your computer and use it in GitHub Desktop.
specification file for us week number
describe "us week number" do
it { expect(us_week_number(Date.parse('20110101'))).to eq 52 }
it { expect(us_week_number(Date.parse('20100101'))).to eq 52 }
it { expect(us_week_number(Date.parse('20091231'))).to eq 52 }
it { expect(us_week_number(Date.parse('20110102'))).to eq 1 }
it { expect(us_week_number(Date.parse('20110102'))).not_to eq Date.parse('20110102').cweek }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment