Newbie question

I installed Rspec and am getting the following failure:

$ sudo gem install rspec
Successfully installed rspec-1.0.8
Installing ri documentation for rspec-1.0.8…
Installing RDoc documentation for rspec-1.0.8…

$ spec -v
RSpec-1.0.8 (r2338) - BDD for Ruby
http://rspec.rubyforge.org/

$ cat acct.rb
describe Account, " when first created" do
it “should have a balance of $0” do

end
end
$ spec acct.rb
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/runner/
behaviour_runner.rb:106:in load': ./acct.rb:3: syntax error, unexpected tDOT3 (SyntaxError) from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/ runner/behaviour_runner.rb:106:in load_specs’
from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/
runner/behaviour_runner.rb:105:in each' from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/ runner/behaviour_runner.rb:105:in load_specs’
from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/
runner/behaviour_runner.rb:49:in prepare!' from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/ runner/behaviour_runner.rb:19:in run’
from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/
runner/command_line.rb:17:in run' from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/bin/spec:3 from /opt/local/bin/spec:16:in load’
from /opt/local/bin/spec:16

Must be a version or other config problem. Can anyone point me in the
right direction?

Thanks,

Pito

On Nov 28, 2007 11:58 AM, Pito S. [email protected] wrote:

    from /opt/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/

runner/command_line.rb:17:in `run’


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

it’s saying you have a syntax error… Can you post your whole file?

That was the whole file. And I think therein lies the problem.

I didn’t realize that I needed a class def for Acct. So this, now,
works:

class Account
end

describe Account, " when first created" do
it “should have a balance of $0” do
end
end

(as I said: newbie :slight_smile:

Thanks!

Pito

On 11/27/07, Pito S. [email protected] wrote:

That was the whole file. And I think therein lies the problem.

Wait, so your file had “…” in it? Yes, that would indeed be a syntax
error.

Pat