merb

Ruby Datamapper table inheritance with associations

不羁岁月 提交于 2019-12-13 11:50:47
问题 I started learning Datamapper and what I liked about it was that I can write my models with real inheritance. Now I wonder, if it is possible to be more advanced about this: class Event include DataMapper::Resource property :id, Serial property :begin, DateTime property :type, Discriminator end class Talk<Event property :title, String belongs_to :meeting end class Meeting<Event has n, :talks end That code fails to create the :title column for the Talk and obviously, the discriminator column

What's the most commonly used unit testing framework for different types of Ruby applications? [duplicate]

馋奶兔 提交于 2019-12-05 05:41:16
This question already has an answer here: What is the community-preferred Ruby unit testing framework? 4 answers Are the same unit testing frameworks used for different web frameworks - Rails, Merb, Sinatra, Ramaze and desktop frameworks - Shoes? And what is the most widely used unit testing framework that would work with all of the various web and desktop frameworks? TestUnit is based on JUnit, and so there is port to most languages. This is probably the most ubiquitous. Behavior driven testing has yielded tools like RSpec, and it seems like right now that may be the most popular test