Sha256: 8a58418df8ef4f3a30a5f3dcc8b4c8e61e603032cd402df2298292371d9d7d34

Contents?: true

Size: 631 Bytes

Versions: 2

Compression:

Stored size: 631 Bytes

Contents

# encoding: utf-8
require "spec_helper"

describe TextNlp::Pattern do
  
  it "should match or not the pattern" do
    TextNlp::Pattern.new("((bd)||(bande dessinée))&&!samsung").match?("cette bd est super").should be_true
    TextNlp::Pattern.new("((bd)||(bande dessinée))&&!samsung").match?("cette bd est illisible sur samsung NTC").should be_false
    TextNlp::Pattern.new("((bd)||(bande dessinée))&&!samsung").match?("cette bande dessinée est illisible sur samsung NTC").should be_false
    TextNlp::Pattern.new("((bd)||(bande dessinée))&&!samsung").match?("cette bande dessinée est illisible").should be_true
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
text_nlp-0.0.2 spec/pattern_spec.rb
text_nlp-0.0.1 spec/pattern_spec.rb