Sha256: ec3710321a07bbdf0af89079728f0cbfb90681916961219fd512e7b434795827

Contents?: true

Size: 600 Bytes

Versions: 5

Compression:

Stored size: 600 Bytes

Contents

require 'ronin/sql/error'

require 'spec_helper'

describe SQL::Error do
  it "should provide error patterns" do
    SQL::Error.patterns.should_not be_empty
  end

  it "should return patterns for specified database types" do
    patterns = SQL::Error.patterns_for(:mysql, :php)

    patterns[0].should == SQL::Error.patterns[:mysql]
    patterns[1].should == SQL::Error.patterns[:php]
  end

  it "should return patterns for a specified SQL dialect" do
    patterns = SQL::Error.patterns_for_dialect(:common)

    patterns.each do |pattern|
      pattern.dialect.should == :common
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ronin-sql-0.2.4 spec/sql/error_spec.rb
ronin-sql-0.2.3 spec/sql/error_spec.rb
ronin-sql-0.2.1 spec/sql/error_spec.rb
ronin-sql-0.2.2 spec/sql/error_spec.rb
ronin-sql-0.2.0 spec/sql/error_spec.rb