Created
October 3, 2012 13:25
-
-
Save fellix/3826889 to your computer and use it in GitHub Desktop.
test approach
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
context 'order' do | |
let :first_payment do | |
Payment.create | |
end | |
let :last_payment do | |
Payment.create | |
end | |
let :payments do | |
[first_payment, last_payment] | |
end | |
before do | |
payments | |
end | |
it "should be ordered by payment id" do | |
expect(Payment.all).to eq payments | |
end | |
end |
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
it 'returns the payments ordered by the id' do | |
first_payment, last_payment = Payment.create, Payment.create | |
expect(Payment.all).to eq [first_payment, last_payment] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment