Skip to content
thumblemonks edited this page Aug 12, 2010 · 5 revisions

Thoughts are welcome on any of the following.

2009-10-26

BrianTheCoder had the following suggestions-by-example:

Hey one thing I was thinking about when looking at riot? couldn’t you have assert/should automatically return topic if no block is given? so:

asserts("email is defined") { topic }.respond_to(:email)

becomes

asserts("email is defined").respond_to(:email)

Also toying around with some idea of something like:

asserts("email is nil", :email).nil

… to which gus thinks the following would be nice as well:

asserts(:email).equals("[email protected]")

2009-06-29

toothrot had the following suggestion-by-example about how to move Riot forward and make it even more expressive:

context "a new user" do
  setup { User.new(:email => "[email protected]", :name => "bob") }

  has_many :sharks

  has_attributes {
    email "[email protected]"
    name "bob"
    phone nil
  }
end

gus went on to offer:

context( User.new(:email => "[email protected]", :name => "bob") ) do
  assert(:name).equals("bob")
end
Clone this wiki locally