Sha256: dfb592512fe2910522377397385c6270ab38174f4539199b986e3692e2e1b69f
Contents?: true
Size: 526 Bytes
Versions: 5
Compression:
Stored size: 526 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 end
Version data entries
5 entries across 5 versions & 1 rubygems