features/step_definitions/locale_steps.rb in csl-1.2.1 vs features/step_definitions/locale_steps.rb in csl-1.2.2
- old
+ new
@@ -9,26 +9,28 @@
When /^I ordinalize the number (\d+)(?: using the (long) form(?: and (feminine|masculine) gender))?$/ do |num, form, gender|
@ordinal = @locale.ordinalize(num, :form => form, :'gender-form' => gender)
end
Then /^the ordinal should (?:be|equal) "([^"]*)"$/ do |ord|
- @ordinal.should == ord
+ expect(@ordinal).to eq(ord)
end
When /^I ordinalize these numbers:?$/ do |table|
@ordinals = table.rows.map do |row|
num, form, gender, number = *row
@csl.ordinalize(num, :form => form, :'gender-form' => gender, :number => number)
end
end
Then /^the ordinals should (?:be|equal):?$/ do |table|
- @ordinals.join(' ').should == table.rows.flatten.join(' ')
+ expect(@ordinals.join(' ')).to eq(table.rows.flatten.join(' '))
end
Then /^the locale should should have (\d+) terms$/ do |num|
- @csl.terms.length.should == num.to_i
+ expect(@csl.terms.length).to eq(num.to_i)
end
Then /^the (\w+[\?!]?) of the term "([^"]*)" should be "([^"]*)"$/ do |method, name, expected|
- @csl.terms.detect { |t| t.name == name }.send(method).should == expected
-end
\ No newline at end of file
+ expect(
+ @csl.terms.detect { |t| t.name == name }.send(method)
+ ).to eq(expected)
+end