NOOB question RSPEC

Hi all !!

I have this code:
require ‘account’

describe Account, “when first created” do
before do
@account =

it “should have a balance of $0” do
@account.balance.should eql(, :dollars))

after do
@account = nil

How can I pass the @account.balance.should eql(, :dollars))
spec. From my understanding you .eql? in ruby is true if the object
are the same (reference points to same object) or if one inherits the
But still can make it work.

Thanks !

Where are you getting the Money class and what result are you
getting? eql? requires that eql?() be defined in that class.

Also, you might cross-post to rSpec group.

[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs