Permalink
Browse files

add find example

  • Loading branch information...
1 parent 6c4017e commit 45929d9f0cffabf1d9bab3134f635cc63fe2da0f @mikehale mikehale committed Feb 18, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/test_lucid.rb
View
@@ -20,6 +20,16 @@ def open(url)
class TestLucid < Test::Unit::TestCase
include TestHelper
+ def test_find
+ ami = Ubuntu.release("lucid").amis.find do |ami|
+ ami.arch == "amd64" and
+ ami.root_store == "instance-store" and
+ ami.region == "us-east-1"
+ end
+
+ assert_equal "ami-fa01f193", ami.name
+ end
+
def test_ami_attributes
ami = Ubuntu.release("lucid").amis.first
assert_equal "ami-f092eca2", ami.name

0 comments on commit 45929d9

Please sign in to comment.