CRUD model Thing, :create contract do property :name property :description validates :name, presence: true validates :description, length: {in: 4..160}, allow_blank: true end def process(params) validate(params[:thing]) do |f| f.save end end end
do html = concept("comment/cell") html = Capybara.string(html) comments = html.all(:css, ".comment") first = comments[0] comments[0].find(".header").must_have_content "[email protected]" comments[0].find(".header time")["datetime"].must_match /\d\d-/