Sha256: 59ae89f9a2b88934d05ca06cda22b1d07dd7ef7a3e2a7a83dbaf73a4f1cf98b3

Contents?: true

Size: 725 Bytes

Versions: 21

Compression:

Stored size: 725 Bytes

Contents

require "spec_helper"

describe "Simple::SQL::Reflection" do
  describe ".columns" do
    it "returns the columns of a table in the public schema" do
      expect(SQL::Reflection.columns("users")).to include("first_name")
    end

    it "returns the columns of a table in a non-'public' schema" do
      expect(SQL::Reflection.columns("information_schema.tables")).to include("table_name")
    end
  end

  describe ".tables" do
    it "returns the tables in the public schema" do
      expect(SQL::Reflection.tables).to include("users")
    end

    it "returns tables in a non-'public' schema" do
      expect(SQL::Reflection.tables(schema: "information_schema")).to include("information_schema.tables")
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
simple-sql-0.4.10 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.9 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.8 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.7 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.5 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.4 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.3 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.2 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.1 spec/simple/sql_reflection_spec.rb
simple-sql-0.4.0 spec/simple/sql_reflection_spec.rb
simple-sql-0.3.7 spec/simple/sql_reflection_spec.rb
simple-sql-0.3.6 spec/simple/sql_reflection_spec.rb
simple-sql-0.3.5 spec/simple/sql_reflection_spec.rb
simple-sql-0.3.4 spec/simple/sql_reflection_spec.rb
simple-sql-0.3.3 spec/simple/sql_reflection_spec.rb
simple-sql-0.2.10 spec/simple/sql_reflection_spec.rb
simple-sql-0.3.2 spec/simple/sql_reflection_spec.rb
simple-sql-0.2.9 spec/simple/sql_reflection_spec.rb
simple-sql-0.3.1 spec/simple/sql_reflection_spec.rb
simple-sql-0.2.8 spec/simple/sql_reflection_spec.rb