Mon, Aug 10

“I have 2 problems with this
- I have to learn and start using this new language to talk about tests
-
I have to learn a whole new syntax to write tests”
#RSpec describe Account, “ when first created” do before do @account = Account.new end it “should have a balance of $0” do @account.balance.should eql(Money.new(0, :dollars)) end after do @account = nil end end # Test::Unit class AccountTest < Test::Unit::TestCase def setup @account = Account.new end def test_should_have_a_balance_of_0_dollars assert @account.balance == Money.new(0, :dollars) end def teardown @account = nil end end
RSpec == Yoda-speak?