diff options
author | Austin Ziegler <austin@zieglers.ca> | 2020-06-23 11:33:25 -0400 |
---|---|---|
committer | Austin Ziegler <austin@zieglers.ca> | 2020-06-23 11:33:25 -0400 |
commit | a7a595e2d5d3b4658d21d33f3f62f7c85ee4c82b (patch) | |
tree | 8e32eb2596f67159dca5302a3efaafcf25bed4de /spec | |
parent | 4168a8eb56231152697290d14ac62a02eac9ac3f (diff) | |
download | diff-lcs-a7a595e2d5d3b4658d21d33f3f62f7c85ee4c82b.tar.gz |
Fix an issue with negative hunk max_size
Resolves #57.
- The `diff_size` should be an absolute value.
- Added a test to ensure that the issue does not introduce a regression.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/issues_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/issues_spec.rb b/spec/issues_spec.rb index 79ddd0b..c4542bb 100644 --- a/spec/issues_spec.rb +++ b/spec/issues_spec.rb @@ -54,4 +54,14 @@ describe 'Diff::LCS Issues' do ] end end + + describe "issue #57" do + it 'should fail with a correct error' do + expect { + actual = {:category=>"app.rack.request"} + expected = {:category=>"rack.middleware", :title=>"Anonymous Middleware"} + expect(actual).to eq(expected) + }.to raise_error(RSpec::Expectations::ExpectationNotMetError) + end + end end |