Jagori79 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/179072

Change subject: Refactor code for RSpec3 expect syntax incorporation
......................................................................

Refactor code for RSpec3 expect syntax incorporation

Change-Id: I25e27d8b363957c4217eaf8516d3c9e61ece156e
---
M tests/browser/features/math.feature
M tests/browser/features/step_definitions/math_steps.rb
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/72/179072/1

diff --git a/tests/browser/features/math.feature 
b/tests/browser/features/math.feature
index 1b5db83..3f9e83b 100644
--- a/tests/browser/features/math.feature
+++ b/tests/browser/features/math.feature
@@ -15,8 +15,8 @@
   Scenario: Display simple math
     Given I am logged in
       And I am at page that does not exist
-      And I click link Create source
-    When I type <math>3 + 2</math>
+    When I click link Create source
+      And I type <math>3 + 2</math>
       And I click Preview
     Then the page should contain an img tag
       And alt for that img should be 3 + 2
diff --git a/tests/browser/features/step_definitions/math_steps.rb 
b/tests/browser/features/step_definitions/math_steps.rb
index 6bb9456..98843e8 100644
--- a/tests/browser/features/step_definitions/math_steps.rb
+++ b/tests/browser/features/step_definitions/math_steps.rb
@@ -27,14 +27,14 @@
 end
 
 Then(/^alt for that img should be (.+)$/) do |alt|
-  on(EditPage).math_image_element.element.alt.should == alt
+  expect(on(EditPage).math_image_element.element.alt).to eq(alt)
 end
 
 Then(/^src for that img should come from (.+)$/) do |src|
-  on(EditPage).math_image_element.element.src.should match Regexp.escape(src)
+  expect(on(EditPage).math_image_element.element.src).to match 
Regexp.escape(src)
 end
 
 
 Then(/^the page should contain an img tag$/) do
-  on(EditPage).math_image_element.when_present.should be_visible
+  expect(on(EditPage).math_image_element.when_present).to be_visible
 end
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/179072
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25e27d8b363957c4217eaf8516d3c9e61ece156e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Jagori79 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to