Use RSpec 'expect' instead of 'should'

This commit is contained in:
Dan Rice 2014-05-16 15:42:03 -04:00
parent 4ee8c2e7fd
commit 7a3f90a020
20 changed files with 208 additions and 248 deletions

View file

@ -16,15 +16,15 @@ end
Then /the badge should show (.*)/ do |number|
badge = find("span#badge_count").text.to_i
badge.should == number.to_i
expect(badge).to eq(number.to_i)
end
Then(/^I should see an error flash message saying "([^"]*)"$/) do |message|
xpath = "//div[@id='message_holder']/h4[@id='flash']"
page.should have_xpath(xpath, :visible => true)
expect(page).to have_xpath(xpath, :visible => true)
text = page.find(:xpath, xpath).text
text.should == message
expect(text).to eq(message)
end
Then /^I should see "([^"]*)" $/ do |text|