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

@ -7,23 +7,23 @@ Then /^I should see a message that you need a project to get feeds for projects$
end
Then /^I should see feeds for projects$/ do
page.should have_css("select#feed-projects option[value='#{@current_user.projects.first.id}']")
expect(page).to have_css("select#feed-projects option[value='#{@current_user.projects.first.id}']")
end
Then /^I should see feeds for contexts$/ do
page.should have_css("select#feed-contexts option[value='#{@current_user.contexts.first.id}']")
expect(page).to have_css("select#feed-contexts option[value='#{@current_user.contexts.first.id}']")
end
Then /^I should see "([^"]*)" as the selected project$/ do |project_name|
page.should have_css 'select#feed-projects option[selected="selected"]'
expect(page).to have_css('select#feed-projects option[selected="selected"]')
end
Then /^I should see "([^"]*)" as the selected context$/ do |context_name|
page.should have_css 'select#feed-contexts option[selected="selected"]'
expect(page).to have_css('select#feed-contexts option[selected="selected"]')
end
Then /^I should see feeds for "([^"]*)" in list of "([^"]*)"$/ do |name, list_type|
wait_for_ajax
xpath= "//div[@id='feeds-for-#{list_type}']//strong"
name.should == find(:xpath, xpath).text
expect(name).to eq(find(:xpath, xpath).text)
end