diff options
Diffstat (limited to 'spec/ruby/library/stringscanner/terminate_spec.rb')
| -rw-r--r-- | spec/ruby/library/stringscanner/terminate_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/ruby/library/stringscanner/terminate_spec.rb b/spec/ruby/library/stringscanner/terminate_spec.rb index 01cea3dbdf..3cff5c010c 100644 --- a/spec/ruby/library/stringscanner/terminate_spec.rb +++ b/spec/ruby/library/stringscanner/terminate_spec.rb @@ -1,7 +1,11 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/terminate.rb', __FILE__) +require_relative '../../spec_helper' require 'strscan' describe "StringScanner#terminate" do - it_behaves_like(:strscan_terminate, :terminate) + it "set the scan pointer to the end of the string and clear matching data." do + s = StringScanner.new('This is a test') + s.terminate + s.should_not.bol? + s.should.eos? + end end |
