[rspec-users] shared descriptions -- a couple of issues

François Beausoleil francois.beausoleil at gmail.com
Mon Jun 4 15:09:10 EDT 2007


Hello David,

2007/6/4, David Chelimsky <dchelimsky at gmail.com>:
> This is all resolved in the current trunk.

Was 1.0.4 cut from the current trunk ?  Because I get the same errors as Greg:

$ rake spec
(in /home/francois/src/xlsuite.com)
/home/francois/src/xlsuite.com/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:10:in
`add_shared_behaviour': Shared Behaviour 'All controllers' already
exists (ArgumentError)
        from /home/francois/src/xlsuite.com/vendor/plugins/rspec/lib/spec/runner/extensions/kernel.rb:36:in
`register_behaviour'
        from /home/francois/src/xlsuite.com/vendor/plugins/rspec/lib/spec/runner/extensions/kernel.rb:24:in
`describe'
        from ./spec/controllers/../xl_suite/spec_helpers.rb:94
        from /home/francois/src/xlsuite.com/vendor/plugins/plugin_dependencies/lib/plugin_dependencies/extensions/kernel.rb:14:in
`gem_original_require_without_plugins'
        from /home/francois/src/xlsuite.com/vendor/plugins/plugin_dependencies/lib/plugin_dependencies/extensions/kernel.rb:14:in
`gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from /home/francois/src/xlsuite.com/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in
`require'
        from /home/francois/src/xlsuite.com/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in
`new_constants_in'
         ... 29 levels...
        from /home/francois/src/xlsuite.com/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:154:in
`parse'
        from /home/francois/src/xlsuite.com/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:88:in
`create_behaviour_runner'
        from /home/francois/src/xlsuite.com/vendor/plugins/rspec/lib/spec/runner/command_line.rb:14:in
`run'
        from /home/francois/src/xlsuite.com/vendor/plugins/rspec/bin/spec:3
rake aborted!
Command ruby -I"/home/francois/src/xlsuite.com/vendor/plugins/rspec/lib"
"/home/francois/src/xlsuite.com/vendor/plugins/rspec/bin/spec"
"spec/views/futures/show_spec.rb" "spec/views/rets/index_view_spec.rb"
"spec/views/rets/import_view_spec.rb"
"spec/views/rets/search_view_spec.rb"
"spec/views/rets/results_view_spec.rb"
"spec/views/rets/done_view_spec.rb"
"spec/views/forum_categories/index_spec.rb"
"spec/controllers/forum_categories_spec.rb"
"spec/controllers/posts_controller_spec.rb"
"spec/controllers/listings_controller_spec.rb"
"spec/controllers/futures_controller_spec.rb"
"spec/controllers/rets_controller_spec.rb"
"spec/models/future_spec.rb" "spec/models/recurring_future_spec.rb"
"spec/helpers/futures_helper_spec.rb"
"spec/helpers/rets_helper_spec.rb" --options
"/home/francois/src/xlsuite.com/config/../spec/spec.opts"  failed

(See full trace by running task with --trace)

$ spec spec/
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.4/lib/spec/dsl/behaviour.rb:10:in
`add_shared_behaviour': Shared Behaviour 'All controllers' already
exists (ArgumentError)
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.4/lib/spec/runner/extensions/kernel.rb:36:in
`register_behaviour'
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.4/lib/spec/runner/extensions/kernel.rb:24:in
`describe'
        from ./spec//controllers/../xl_suite/spec_helpers.rb:94
        from /home/francois/src/xlsuite.com/vendor/plugins/plugin_dependencies/lib/plugin_dependencies/extensions/kernel.rb:14:in
`gem_original_require_without_plugins'
        from /home/francois/src/xlsuite.com/vendor/plugins/plugin_dependencies/lib/plugin_dependencies/extensions/kernel.rb:14:in
`gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from /home/francois/src/xlsuite.com/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in
`require'
        from /home/francois/src/xlsuite.com/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in
`new_constants_in'
         ... 31 levels...
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.4/lib/spec/runner/command_line.rb:14:in
`run'
        from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.4/bin/spec:3
        from /usr/local/bin/spec:16:in `load'
        from /usr/local/bin/spec:16

$ spec spec/models/
..................................

Finished in 1.899439 seconds

34 examples, 0 failures

My shared behaviors are specified in file
spec/xl_suite/spec_helpers.rb, module XlSuite::SpecHelpers.

Thanks !
-- 
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/


More information about the rspec-users mailing list