Permalink
Browse files

-I is merged among configuration sources

  • Loading branch information...
1 parent 9a79082 commit 5f730b0cb072858ede68ed05f40527fb74539041 @alindeman alindeman committed Jun 11, 2012
Showing with 11 additions and 2 deletions.
  1. +2 −1 Changelog.md
  2. +1 −1 lib/rspec/core/configuration_options.rb
  3. +8 −0 spec/rspec/core/configuration_options_spec.rb
View
@@ -20,7 +20,8 @@ Bug fixes
* When an example raises an error and an after or around hook does as
well, print out the hook error. Previously, the error was silenced and
the user got no feedback about what happened. (Myron Marston)
-* `--require` is merged among different configuration sources (Andy Lindeman)
+* `--require` and `-I` are merged among different configuration sources (Andy
+ Lindeman)
### 2.10.1 / 2012-05-19
[full changelog](http://github.com/rspec/rspec-core/compare/v2.10.0...v2.10.1)
@@ -46,7 +46,7 @@ def filter_manager
:line_numbers, :full_description, :full_backtrace, :tty
].to_set
- MERGED_OPTIONS = [:requires].to_set
+ MERGED_OPTIONS = [:requires, :libs].to_set
def force?(key)
!NON_FORCED_OPTIONS.include?(key)
@@ -103,6 +103,14 @@
config.should_receive(:requires=).with(["file_from_opts", "file_from_env"])
opts.configure(config)
end
+
+ it "merges --I specified by multiple configuration sources" do
+ ENV['SPEC_OPTS'] = "-I dir_from_env"
+ opts = config_options_object(*%w[-I dir_from_opts])
+ config = RSpec::Core::Configuration.new
+ config.should_receive(:libs=).with(["dir_from_opts", "dir_from_env"])
+ opts.configure(config)
+ end
end
describe "-c, --color, and --colour" do

0 comments on commit 5f730b0

Please sign in to comment.