mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-14 16:26:32 +01:00
Use RSpec 'expect' instead of 'should'
This commit is contained in:
parent
4ee8c2e7fd
commit
7a3f90a020
20 changed files with 208 additions and 248 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue