[rspec-users] Help with some basics

Andrew Timberlake andrew at andrewtimberlake.com
Thu Apr 30 10:44:49 EDT 2009


I'm suddenly getting an error on my specs

/usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_methods.rb:24:in
`description': No description supplied for example declared on
/home/andrew/dev/rhythm/website/spec/models/product_template_spec.rb:4
(Spec::Example::NoDescriptionError)
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_methods.rb:51:in
`execute'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_group_methods.rb:207:in
`run_examples'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_group_methods.rb:205:in
`each'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_group_methods.rb:205:in
`run_examples'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_group_methods.rb:103:in
`run'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/runner/example_group_runner.rb:23:in
`run'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/runner/example_group_runner.rb:22:in
`each'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/runner/example_group_runner.rb:22:in
`run'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/runner/options.rb:119:in
`run_examples'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/runner/command_line.rb:9:in
`run'
	from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/bin/spec:4
	from /usr/local/bin/spec:19:in `load'
	from /usr/local/bin/spec:19


The spec is as follows (using Remarkable)
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe ProductTemplate do
  it { should belong_to(:account) }

  it { should validate_presence_of(:account) }
  it { should validate_presence_of(:name) }
  it { should validate_presence_of(:cost) }

  it { should validate_length_of(:name).within(1..100) }

  it { should validate_uniqueness_of(:name) }
end

I've just updated to the latest versions of rspec, rspec-rails and remarkable


Not sure what I'm doing wrong here.

Thanks

Andrew


More information about the rspec-users mailing list