Skip to content

Commit

Permalink
added test case for 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomulik committed Feb 9, 2014
1 parent c52704d commit 5cae0a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
2014-02-09 Pawel Tomulik <ptomulik@meil.pw.edu.pl>
* added test case for 100% coverage
* release 0.0.7
* fixed match_spec.rb to work on 1.8 and 2.0
* revised examples in README.md and added specs to cover them
Expand Down
7 changes: 7 additions & 0 deletions spec/unit/oval/match_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@
it { expect { described_class[re].validate(*args) }.to raise_error Oval::ValueError, msg }
end
end
context "#{described_class.name}[/foo/].validate(im_raising_type_error)" do
let(:re) { /foo/ }
let(:msg) { 'error message' }
let(:im_raising_type_error) { stub('im_raising_type_error') }
before { re.stubs(:match).with(im_raising_type_error).raises TypeError, msg }
it { expect { described_class[re].validate(im_raising_type_error) }.to raise_error TypeError, msg }
end
end

describe "#it_should" do
Expand Down

0 comments on commit 5cae0a0

Please sign in to comment.