Skip to content

Instantly share code, notes, and snippets.

@svs
Created October 11, 2012 06:45
Show Gist options
  • Save svs/3870632 to your computer and use it in GitHub Desktop.
Save svs/3870632 to your computer and use it in GitHub Desktop.
readable loan spec
describe "scheduled first payment date must be a center meeting date" do
let(:center) { FactoryGirl.create(:center) }
subject { FactoryGirl.build(:loan,
:center => center,
:scheduled_first_payment_date => Date.new(2012,2,2) }
before { center.stub(:center_meeting_dates).and_return([Date.new(2012,2,1)])
it { should_not be_valid }
its("errors") { should have_key(:schedled_first_payment_date) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment