Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add specs exposing failing attribute setters

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
  • Loading branch information...
commit 79080582261b0ee9015f1f565c045db079c3be2a 1 parent 659c23a
@samphippen samphippen authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 spec/rspec/core/configuration_spec.rb
View
16 spec/rspec/core/configuration_spec.rb
@@ -949,7 +949,7 @@ def metadata_hash(*args)
context "given false" do
it "restores backtrace clean patterns" do
config.full_backtrace = false
- expect(config.backtrace_clean_patterns).to eq(RSpec::Core::Configuration::DEFAULT_BACKTRACE_PATTERNS)
+ expect(config.backtrace_clean_patterns).to eq(RSpec::Core::BacktraceCleaner::DEFAULT_EXCLUDE_PATTERNS)
end
end
@@ -962,12 +962,26 @@ def metadata_hash(*args)
end
end
+ describe "#backtrace_clean_patterns=" do
+ it "actually receives the new filter values" do
+ config = Configuration.new
+ config.backtrace_clean_patterns = [/.*/]
+ expect(config.backtrace_cleaner.exclude? "this").to be_true
+ end
+ end
+
describe "#backtrace_clean_patterns" do
it "is deprecated" do
RSpec.should_receive(:warn_deprecation)
config = Configuration.new
config.backtrace_clean_patterns
end
+
+ it "can be appended to" do
+ config = Configuration.new
+ config.backtrace_clean_patterns << /.*/
+ expect(config.backtrace_cleaner.exclude? "this").to be_true
+ end
end
describe ".backtrace_cleaner#exclude? defaults" do
Please sign in to comment.
Something went wrong with that request. Please try again.