test/test_capybara-extensions.rb in capybara-extensions-0.1.0 vs test/test_capybara-extensions.rb in capybara-extensions-0.2.0

- old
+ new

@@ -1,7 +1,13 @@ require 'helper' class TestCapybaraExtensions < Test::Unit::TestCase - should "probably rename this file and start testing for real" do - flunk "hey buddy, you should probably rename this file and start testing for real" + should "find a node's parent" do + html = <<-EOM + <div id="parent">a<div id="child">b</div> + EOM + + doc = Capybara.string(html) + assert_equal doc.find('#child').parent[:id], 'parent' + end end