summaryrefslogtreecommitdiff
path: root/features/steps/project/merge_requests.rb
diff options
context:
space:
mode:
Diffstat (limited to 'features/steps/project/merge_requests.rb')
-rw-r--r--features/steps/project/merge_requests.rb64
1 files changed, 32 insertions, 32 deletions
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index f6cfa7ef9ed..fe019a0b3af 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -25,43 +25,43 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see merge request "Wiki Feature"' do
within '.merge-request' do
- page.should have_content "Wiki Feature"
+ expect(page).to have_content "Wiki Feature"
end
end
step 'I should see closed merge request "Bug NS-04"' do
merge_request = MergeRequest.find_by!(title: "Bug NS-04")
- merge_request.closed?.should be_true
- page.should have_content "Rejected by"
+ expect(merge_request.closed?).to be_true
+ expect(page).to have_content "Rejected by"
end
step 'I should see merge request "Bug NS-04"' do
- page.should have_content "Bug NS-04"
+ expect(page).to have_content "Bug NS-04"
end
step 'I should see "Bug NS-04" in merge requests' do
- page.should have_content "Bug NS-04"
+ expect(page).to have_content "Bug NS-04"
end
step 'I should see "Feature NS-03" in merge requests' do
- page.should have_content "Feature NS-03"
+ expect(page).to have_content "Feature NS-03"
end
step 'I should not see "Feature NS-03" in merge requests' do
- page.should_not have_content "Feature NS-03"
+ expect(page).not_to have_content "Feature NS-03"
end
step 'I should not see "Bug NS-04" in merge requests' do
- page.should_not have_content "Bug NS-04"
+ expect(page).not_to have_content "Bug NS-04"
end
step 'I should see that I am subscribed' do
- find(".subscribe-button span").text.should == "Unsubscribe"
+ expect(find(".subscribe-button span").text).to eq "Unsubscribe"
end
step 'I should see that I am unsubscribed' do
- find(".subscribe-button span").should have_content("Subscribe")
+ expect(find(".subscribe-button span")).to have_content("Subscribe")
end
step 'I click button "Unsubscribe"' do
@@ -125,7 +125,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
expect(buttons.count).to eq(2)
buttons.each do |b|
- expect(b['href']).should_not have_content('json')
+ expect(expect(b['href'])).not_to have_content('json')
end
end
@@ -164,24 +164,24 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see a discussion has started on diff' do
- page.should have_content "#{current_user.name} started a discussion"
- page.should have_content sample_commit.line_code_path
- page.should have_content "Line is wrong"
+ expect(page).to have_content "#{current_user.name} started a discussion"
+ expect(page).to have_content sample_commit.line_code_path
+ expect(page).to have_content "Line is wrong"
end
step 'I should see a discussion has started on commit diff' do
- page.should have_content "#{current_user.name} started a discussion on commit"
- page.should have_content sample_commit.line_code_path
- page.should have_content "Line is wrong"
+ expect(page).to have_content "#{current_user.name} started a discussion on commit"
+ expect(page).to have_content sample_commit.line_code_path
+ expect(page).to have_content "Line is wrong"
end
step 'I should see a discussion has started on commit' do
- page.should have_content "#{current_user.name} started a discussion on commit"
- page.should have_content "One comment to rule them all"
+ expect(page).to have_content "#{current_user.name} started a discussion on commit"
+ expect(page).to have_content "One comment to rule them all"
end
step 'merge request is mergeable' do
- page.should have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept Merge Request'
end
step 'I modify merge commit message' do
@@ -206,7 +206,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see merged request' do
within '.issue-box' do
- page.should have_content "Accepted"
+ expect(page).to have_content "Accepted"
end
end
@@ -216,7 +216,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see reopened merge request "Bug NS-04"' do
within '.issue-box' do
- page.should have_content "Open"
+ expect(page).to have_content "Open"
end
end
@@ -234,25 +234,25 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should not see a comment like "Line is wrong" in the second file' do
within '.files [id^=diff]:nth-child(2)' do
- page.should_not have_visible_content "Line is wrong"
+ expect(page).not_to have_visible_content "Line is wrong"
end
end
step 'I should see a comment like "Line is wrong" in the second file' do
within '.files [id^=diff]:nth-child(2) .note-body > .note-text' do
- page.should have_visible_content "Line is wrong"
+ expect(page).to have_visible_content "Line is wrong"
end
end
step 'I should not see a comment like "Line is wrong here" in the second file' do
within '.files [id^=diff]:nth-child(2)' do
- page.should_not have_visible_content "Line is wrong here"
+ expect(page).not_to have_visible_content "Line is wrong here"
end
end
step 'I should see a comment like "Line is wrong here" in the second file' do
within '.files [id^=diff]:nth-child(2) .note-body > .note-text' do
- page.should have_visible_content "Line is wrong here"
+ expect(page).to have_visible_content "Line is wrong here"
end
end
@@ -265,7 +265,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
within ".files [id^=diff]:nth-child(1) .note-body > .note-text" do
- page.should have_content "Line is correct"
+ expect(page).to have_content "Line is correct"
end
end
@@ -280,7 +280,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should still see a comment like "Line is correct" in the first file' do
within '.files [id^=diff]:nth-child(1) .note-body > .note-text' do
- page.should have_visible_content "Line is correct"
+ expect(page).to have_visible_content "Line is correct"
end
end
@@ -298,7 +298,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see comments on the side-by-side diff page' do
within '.files [id^=diff]:nth-child(1) .parallel .note-body > .note-text' do
- page.should have_visible_content "Line is correct"
+ expect(page).to have_visible_content "Line is correct"
end
end
@@ -316,8 +316,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see new target branch changes' do
- page.should have_content 'From fix into feature'
- page.should have_content 'Target branch changed from master to feature'
+ expect(page).to have_content 'From fix into feature'
+ expect(page).to have_content 'Target branch changed from master to feature'
end
def merge_request
@@ -334,7 +334,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_button "Add Comment"
end
- page.should have_content message
+ expect(page).to have_content message
end
def init_diff_note_first_file