update cucumber step defs to rspec 3 assertion syntax.

This commit is contained in:
Micah Geisel 2018-05-04 12:41:54 -07:00
parent fe1d9f8400
commit 68c49abf5d
8 changed files with 24 additions and 24 deletions

View File

@ -11,7 +11,7 @@ When /^I create a widget using activerecord$/ do
end
Then /^I should see ([\d]+) widget using activerecord$/ do |widget_count|
ActiveRecordWidget.count.should == widget_count.to_i
expect(ActiveRecordWidget.count).to eq widget_count.to_i
end
When /^I create a widget in one db using activerecord$/ do
@ -23,9 +23,9 @@ When /^I create a widget in another db using activerecord$/ do
end
Then /^I should see ([\d]+) widget in one db using activerecord$/ do |widget_count|
ActiveRecordWidgetUsingDatabaseOne.count.should == widget_count.to_i
expect(ActiveRecordWidgetUsingDatabaseOne.count).to eq widget_count.to_i
end
Then /^I should see ([\d]+) widget in another db using activerecord$/ do |widget_count|
ActiveRecordWidgetUsingDatabaseTwo.count.should == widget_count.to_i
expect(ActiveRecordWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
end

View File

@ -11,7 +11,7 @@ When /^I create a widget using couchpotato$/ do
end
Then /^I should see ([\d]+) widget using couchpotato$/ do |widget_count|
CouchPotatoWidget.count.should == widget_count.to_i
expect(CouchPotatoWidget.count).to eq widget_count.to_i
end
When /^I create a widget in one db using couchpotato$/ do
@ -23,9 +23,9 @@ When /^I create a widget in another db using couchpotato$/ do
end
Then /^I should see ([\d]+) widget in one db using couchpotato$/ do |widget_count|
CouchPotatoWidgetUsingDatabaseOne.count.should == widget_count.to_i
expect(CouchPotatoWidgetUsingDatabaseOne.count).to eq widget_count.to_i
end
Then /^I should see ([\d]+) widget in another db using couchpotato$/ do |widget_count|
CouchPotatoWidgetUsingDatabaseTwo.count.should == widget_count.to_i
expect(CouchPotatoWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
end

View File

@ -11,7 +11,7 @@ When /^I create a widget using datamapper$/ do
end
Then /^I should see ([\d]+) widget using datamapper$/ do |widget_count|
DataMapperWidget.count.should == widget_count.to_i
expect(DataMapperWidget.count).to eq widget_count.to_i
end
When /^I create a widget in one db using datamapper$/ do
@ -29,9 +29,9 @@ When /^I create a widget in another db using datamapper$/ do
end
Then /^I should see ([\d]+) widget in one db using datamapper$/ do |widget_count|
DataMapperWidgetUsingDatabaseOne.count.should == widget_count.to_i
expect(DataMapperWidgetUsingDatabaseOne.count).to eq widget_count.to_i
end
Then /^I should see ([\d]+) widget in another db using datamapper$/ do |widget_count|
DataMapperWidgetUsingDatabaseTwo.count.should == widget_count.to_i
expect(DataMapperWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
end

View File

@ -3,7 +3,7 @@ When /^I create a widget using mongoid$/ do
end
Then /^I should see ([\d]+) widget using mongoid$/ do |widget_count|
MongoidWidget.count.should == widget_count.to_i
expect(MongoidWidget.count).to eq widget_count.to_i
end
When /^I create a widget in one db using mongoid$/ do
@ -15,9 +15,9 @@ When /^I create a widget in another db using mongoid$/ do
end
Then /^I should see ([\d]+) widget in one db using mongoid$/ do |widget_count|
MongoidWidgetUsingDatabaseOne.count.should == widget_count.to_i
expect(MongoidWidgetUsingDatabaseOne.count).to eq widget_count.to_i
end
Then /^I should see ([\d]+) widget in another db using mongoid$/ do |widget_count|
MongoidWidgetUsingDatabaseTwo.count.should == widget_count.to_i
expect(MongoidWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
end

View File

@ -11,7 +11,7 @@ When /^I create a widget using mongomapper$/ do
end
Then /^I should see ([\d]+) widget using mongomapper$/ do |widget_count|
MongoMapperWidget.count.should == widget_count.to_i
expect(MongoMapperWidget.count).to eq widget_count.to_i
end
When /^I create a widget in one db using mongomapper$/ do
@ -23,9 +23,9 @@ When /^I create a widget in another db using mongomapper$/ do
end
Then /^I should see ([\d]+) widget in one db using mongomapper$/ do |widget_count|
MongoMapperWidgetUsingDatabaseOne.count.should == widget_count.to_i
expect(MongoMapperWidgetUsingDatabaseOne.count).to eq widget_count.to_i
end
Then /^I should see ([\d]+) widget in another db using mongomapper$/ do |widget_count|
MongoMapperWidgetUsingDatabaseTwo.count.should == widget_count.to_i
expect(MongoMapperWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
end

View File

@ -3,7 +3,7 @@ When /^I create a widget using neo4j$/ do
end
Then /^I should see ([\d]+) widget using neo4j$/ do |widget_count|
Neo4jWidget.count.should == widget_count.to_i
expect(Neo4jWidget.count).to eq widget_count.to_i
end
When /^I create a widget in one db using neo4j$/ do
@ -15,9 +15,9 @@ When /^I create a widget in another db using neo4j$/ do
end
Then /^I should see ([\d]+) widget in one db using neo4j$/ do |widget_count|
Neo4jWidgetUsingDatabaseOne.count.should == widget_count.to_i
expect(Neo4jWidgetUsingDatabaseOne.count).to eq widget_count.to_i
end
Then /^I should see ([\d]+) widget in another db using neo4j$/ do |widget_count|
Neo4jWidgetUsingDatabaseTwo.count.should == widget_count.to_i
expect(Neo4jWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
end

View File

@ -11,7 +11,7 @@ When /^I create a widget using ohm$/ do
end
Then /^I should see ([\d]+) widget using ohm$/ do |widget_count|
OhmWidget.count.should == widget_count.to_i
expect(OhmWidget.count).to eq widget_count.to_i
end
When /^I create a widget in one db using ohm$/ do
@ -23,9 +23,9 @@ When /^I create a widget in another db using ohm$/ do
end
Then /^I should see ([\d]+) widget in one db using ohm$/ do |widget_count|
OhmWidgetUsingDatabaseOne.count.should == widget_count.to_i
expect(OhmWidgetUsingDatabaseOne.count).to eq widget_count.to_i
end
Then /^I should see ([\d]+) widget in another db using ohm$/ do |widget_count|
OhmWidgetUsingDatabaseTwo.count.should == widget_count.to_i
expect(OhmWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
end

View File

@ -11,7 +11,7 @@ When /^I create a widget using redis$/ do
end
Then /^I should see ([\d]+) widget using redis$/ do |widget_count|
RedisWidget.count.should == widget_count.to_i
expect(RedisWidget.count).to eq widget_count.to_i
end
When /^I create a widget in one db using redis$/ do
@ -23,9 +23,9 @@ When /^I create a widget in another db using redis$/ do
end
Then /^I should see ([\d]+) widget in one db using redis$/ do |widget_count|
RedisWidgetUsingDatabaseOne.count.should == widget_count.to_i
expect(RedisWidgetUsingDatabaseOne.count).to eq widget_count.to_i
end
Then /^I should see ([\d]+) widget in another db using redis$/ do |widget_count|
RedisWidgetUsingDatabaseTwo.count.should == widget_count.to_i
expect(RedisWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
end