fix failing cuke

This commit is contained in:
Maxwell Salzberg 2011-07-12 20:17:53 -07:00
parent 6523f0542a
commit 07ca376854
2 changed files with 7 additions and 9 deletions

View file

@ -9,17 +9,9 @@ Feature: posting
And a user with username "alice" And a user with username "alice"
When I sign in as "bob@bob.bob" When I sign in as "bob@bob.bob"
And I post a status with the text "I am da #boss"
And I am on the home page And I am on the home page
And I expand the publisher
And I fill in "status_message_fake_text" with "I am da #boss"
And I press the first ".public_icon" within "#publisher"
And I press "Share"
And I wait for the ajax to finish
And I wait for the ajax to finish
And I follow "#boss"
And I wait for the ajax to finish
Then I should see "I am da #boss" Then I should see "I am da #boss"

View file

@ -106,6 +106,7 @@ Given /^many posts from alice for bob$/ do
end end
end end
Then /^I should have (\d) contacts? in "([^"]*)"$/ do |n_contacts, aspect_name| Then /^I should have (\d) contacts? in "([^"]*)"$/ do |n_contacts, aspect_name|
@me.aspects.where(:name => aspect_name).first.contacts.count.should == n_contacts.to_i @me.aspects.where(:name => aspect_name).first.contacts.count.should == n_contacts.to_i
end end
@ -138,6 +139,11 @@ When /^I add the person to a new aspect called "([^\"]*)"$/ do |aspect_name|
} }
end end
When /^I post a status with the text "([^\"]*)"$/ do |text|
@me.post(:status_message, :text => text, :public => true, :to => 'all')
end
And /^I follow the "([^\"]*)" link from the Devise.mailer$/ do |link_text| And /^I follow the "([^\"]*)" link from the Devise.mailer$/ do |link_text|
doc = Nokogiri(Devise.mailer.deliveries.first.body.to_s) doc = Nokogiri(Devise.mailer.deliveries.first.body.to_s)
links = doc.css('a') links = doc.css('a')