`autoload`, besides being deprecated by Matz, does not work to require files that are in unactivated gems--it only works with ruby's built in require, for files that are available relative to a directory on the load path. Instead, we use `const_missing` to make it work. Closes #647.
- lib/rspec/core/shared_example_group.rb:41: warning: `&' interpreted as argument prefix - spec/rspec/core/configuration_spec.rb:86: warning: ambiguous first argument; put parentheses or even spaces - spec/rspec/core/configuration_spec.rb:182: warning: ambiguous first argument; put parentheses or even spaces - spec/rspec/core/option_parser_spec.rb:71: warning: possibly useless use of == in void context Closes #645.
This reverts commit 713ad6f.
This is causing failures in Ruby 1.8.7, jruby, and ree This reverts commit 576b82d.
- a bit more OO - one less conditional per hook registration
Instead, make it only available on: - The main object--so it can be used at the top level. - Modules--so example groups can be declared nested within modules, as is the common practice. Besides this, the only other place we need describe is from within example groups (so we can nest them), and this is taken care of by RSpec::Core::ExampleGroup.describe. I got the idea for this from a recent change in Sinatra that similarly limits the DSL to just the main object rather than all objects: sinatra/sinatra@46bdb7d
* e.g., `--require` specified in SPEC_OPTS will be merged with `--require` specified in `.rspec` * Fixes #594
- Most of the time users don't use DRB. This'll speed up the start time a bit by not unnecessarily loading it when it's not used. - Apparently jruby 1.7.0-preview1 loads the delegate library when DRB is loaded . This causes expectations on delegate objects to fail because `should` never gets added to them. By delaying when delegate gets loaded, it allows a user to load `rspec/expectations` and then `delegate` and ensure it works.  rspec/rspec-expectations#148 (comment)  The backtrace at the point delegate is loaded: /Users/myron/.rvm/rubies/jruby-head/lib/ruby/1.9/drb/drb.rb:1:in `require' /Users/myron/.rvm/rubies/jruby-head/lib/ruby/1.9/drb/drb.rb:1:in `(root)' /Users/myron/.rvm/rubies/jruby-head/lib/ruby/1.9/drb/drb.rb:57:in `require' /Users/myron/.rvm/rubies/jruby-head/lib/ruby/1.9/drb/drb.rb:57:in `(root)' /Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:1:in `require' /Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:1:in `(root)' /Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:1:in `(root)' file:/Users/myron/.rvm/rubies/jruby-head/lib/jruby.jar!/jruby/kernel19/kernel.rb:1:in `(root)' file:/Users/myron/.rvm/rubies/jruby-head/lib/jruby.jar!/jruby/kernel19/kernel.rb:19:in `require' file:/Users/myron/.rvm/rubies/jruby-head/lib/jruby.jar!/jruby/kernel19/kernel.rb:19:in `require_relative' /Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core.rb:4:in `require' /Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core.rb:4:in `require_rspec' /Users/myron/.rvm/gems/jruby-head/bin/rspec:23:in `load' /Users/myron/.rvm/gems/jruby-head/bin/rspec:23:in `(root)'
…lock. - Closes #615.
`subject` already memoizes the value