Given /^locales$/ do create_locale_tree end When /^I visit "([^"]*)"$/ do |url| visit url end Then /^the directory shows an address vcard$/ do page.should have_selector('div.vcard') end Given /^zip-coded locations$/ do Location.expects(:near).returns(Location.all) end private def create_locale_tree LocationImport.test 'spec/test-locations.xls' end