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

2009-06-29: toothrot had the following suggestion-by-example about how to move protest 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