Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug with full_description and line_numbers= from previous commit.

  • Loading branch information...
commit 61c8ec6f84eab8b1a52c113d43281dc19eb0633e 1 parent 602c23b
@dchelimsky dchelimsky authored
View
8 lib/rspec/core/configuration_options.rb
@@ -12,8 +12,12 @@ def initialize(args)
def configure(config)
formatters = options.delete(:formatters)
- config.line_numbers = line_numbers if line_numbers = options.delete(:line_numbers)
- config.full_description = full_description if full_description = options.delete(:full_description)
+ if line_numbers = options.delete(:line_numbers)
+ config.line_numbers = line_numbers
+ end
+ if full_description = options.delete(:full_description)
+ config.full_description = full_description
+ end
order(options.keys, :libs, :requires, :default_path, :pattern).each do |key|
# temp to get through refactoring - eventually all options will be
View
14 spec/rspec/core/configuration_options_spec.rb
@@ -75,6 +75,20 @@
config.should_receive(:force).with(:exclusion_filter => {:foo => 'bar'})
opts.configure(config)
end
+
+ it "sets full_description" do
+ opts = config_options_object("--example", "this and that")
+ config = RSpec::Core::Configuration.new
+ config.should_receive(:full_description=).with(/this\ and\ that/)
+ opts.configure(config)
+ end
+
+ it "sets line_numbers" do
+ opts = config_options_object(*%w[--line_number 37])
+ config = RSpec::Core::Configuration.new
+ config.should_receive(:line_numbers=).with(["37"])
+ opts.configure(config)
+ end
end
describe "-c, --color, and --colour" do
View
1  spec/rspec/core/example_spec.rb
@@ -285,5 +285,4 @@ def assert(val)
end
end
-
end
Please sign in to comment.
Something went wrong with that request. Please try again.