On Dec 2, 2010, at 4:31 AM, Log0 wrote:

> Hi all,
> 
> I am new to RSpec, currently using rspec-rails (2.1.0) with rails (2.2.3)

For rails-2 you need to use rspec-rails-1.3.1 (rspec-rails-2.x supports only 
rails ~> 3.0).

> and ruby (1.8.7). I can get RSpec running however the stacktrace when it 
> happened is pretty uninformative, always not including the line in which the 
> assertion failed. I tried to google around for some keywords but doesn't seem 
> to yield anything.
> 
> Could someone please advice on what can I do to post more informative 
> stacktrace and results? Thanks.
> 
> =========================================================================
> 1)
> 'OrderManager should create an order successfully and returns it if enough 
> information is given' FAILED
> expected not: == nil,
>          got:    nil
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/expectations/fail_with.rb:41:in
>  `fail_with'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb:39:in
>  `fail_with_message'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb:72:in
>  `__delegate_operator'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb:51:in
>  `eval_match'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb:29:in
>  `=='
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/example/example_methods.rb:40:in
>  `instance_eval'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/example/example_methods.rb:40:in
>  `execute'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/example/example_methods.rb:37:in
>  `execute'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:214:in
>  `run_examples'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:212:in
>  `each'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:212:in
>  `run_examples'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:103:in
>  `run'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:23:in
>  `run'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:22:in
>  `each'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:22:in
>  `run'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/runner/options.rb:151:in 
> `run_examples'
> /home/web/www/bh2/vendor/plugins/rspec/lib/spec/runner/command_line.rb:9:in 
> `run'
> script/spec:10:

The backtrace suggests that you're actually using rspec-1 as a plugin. I'd 
strongly recommend that you remove the plugin and configure your app to use use 
rspec-rails-1.3.3 and rspec-1.3.1 gems instead. One reason is there is no easy 
way to tell which version of the rspec plugin you have installed.

Cheers,
David

> 
> Finished in 0.132014 seconds
> =========================================================================
> 
> Thank you.
> 
> -- 
> Best Regards
> Eric Chio
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to