Sha256: 507fd761916f3a55fc6dfe31c19f17ce4c7e36fa2160a9d69e544b6c3a8d65b1
Contents?: true
Size: 554 Bytes
Versions: 14
Compression:
Stored size: 554 Bytes
Contents
Then /^I should find the following for the last (.*):$/ do |model, table| model_class = model.camelize.constantize last_instance = model_class.last or raise "No #{model.pluralize} exist" table.hashes.first.each do |key, value| last_instance.attributes[key].to_s.should == value end end Then /^there should be (\d+) (.*)$/ do |count, model| model_class = model.singularize.camelize.constantize model_class.count.should == count.to_i end Before do Post.delete_all User.delete_all Category.delete_all CategoryGroup.delete_all end
Version data entries
14 entries across 14 versions & 2 rubygems