Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

just making sure we pick up a fresh order

  • Loading branch information...
commit 793005e603c48a0866b59e06960aa89d974cbdfe 1 parent af25aea
@tomcz tomcz authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 features/step_definitions/shopping_steps.rb
View
5 features/step_definitions/shopping_steps.rb
@@ -24,8 +24,13 @@
order = Order.find(:all, :order => 'created_at DESC').first
order.line_items.size.should == 1
+ order.created_at.should be_recent
line_item = order.line_items.first
line_item.product.id.should == @product_id
line_item.quantity.should == 1
end
+
+def be_recent
+ simple_matcher("less than five seconds old") { |given| given > Time.now - 5 }
+end
Please sign in to comment.
Something went wrong with that request. Please try again.