When /^I post a photo with a token$/ do json = JSON.parse < @me.authentication_token)) end Then /^I should see an uploaded image within the photo drop zone$/ do find("#photodropzone img")["src"].should include("uploads/images") end Given /^"([^"]*)" has a public post with text "([^"]*)"$/ do |email, text| user = User.find_by_email(email) user.post(:status_message, :text => text, :public => true, :to => user.aspects) end Given /^"([^"]*)" has a non public post with text "([^"]*)"$/ do |email, text| user = User.find_by_email(email) user.post(:status_message, :text => text, :public => false, :to => user.aspects) end When /^The user deletes their first post$/ do @me.posts.first.destroy end