From 1666aededdbfd6e00f352dc30c13fdb0eb2007cf Mon Sep 17 00:00:00 2001 From: Hiemanshu Sharma Date: Mon, 25 Nov 2024 16:11:13 +0530 Subject: [PATCH] Fix typos --- lib/scenic/adapters/postgres.rb | 4 ++-- spec/scenic/statements_spec.rb | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/scenic/adapters/postgres.rb b/lib/scenic/adapters/postgres.rb index 9941832a..694ab870 100644 --- a/lib/scenic/adapters/postgres.rb +++ b/lib/scenic/adapters/postgres.rb @@ -14,7 +14,7 @@ module Scenic module Adapters # An adapter for managing Postgres views. # - # These methods are used interally by Scenic and are not intended for direct + # These methods are used internally by Scenic and are not intended for direct # use. Methods that alter database schema are intended to be called via # {Statements}, while {#refresh_materialized_view} is called via # {Scenic.database}. @@ -188,7 +188,7 @@ def drop_materialized_view(name) # This is typically called from application code via {Scenic.database}. # # @param name The name of the materialized view to refresh. - # @param concurrently [Boolean] Whether the refreshs hould happen + # @param concurrently [Boolean] Whether the refresh should happen # concurrently or not. A concurrent refresh allows the view to be # refreshed without locking the view for select but requires that the # table have at least one unique index that covers all rows. Attempts to diff --git a/spec/scenic/statements_spec.rb b/spec/scenic/statements_spec.rb index 39cf1387..1e977a72 100644 --- a/spec/scenic/statements_spec.rb +++ b/spec/scenic/statements_spec.rb @@ -22,7 +22,7 @@ module Scenic end it "creates a view from a text definition" do - sql_definition = "a defintion" + sql_definition = "a definition" connection.create_view(:views, sql_definition: sql_definition) @@ -30,7 +30,7 @@ module Scenic .with(:views, sql_definition) end - it "creates version 1 of the view if neither version nor sql_defintion are provided" do + it "creates version 1 of the view if neither version nor sql_definition are provided" do version = 1 definition_stub = instance_double("Definition", to_sql: "foo") allow(Definition).to receive(:new) @@ -43,9 +43,9 @@ module Scenic .with(:views, definition_stub.to_sql) end - it "raises an error if both version and sql_defintion are provided" do + it "raises an error if both version and sql_definition are provided" do expect do - connection.create_view :foo, version: 1, sql_definition: "a defintion" + connection.create_view :foo, version: 1, sql_definition: "a definition" end.to raise_error ArgumentError end end @@ -108,7 +108,7 @@ module Scenic end it "updates a view from a text definition" do - sql_definition = "a defintion" + sql_definition = "a definition" connection.update_view(:name, sql_definition: sql_definition) @@ -144,19 +144,19 @@ module Scenic .with(:name, definition.to_sql, no_data: true) end - it "raises an error if not supplied a version or sql_defintion" do + it "raises an error if not supplied a version or sql_definition" do expect { connection.update_view :views }.to raise_error( ArgumentError, /sql_definition or version must be specified/ ) end - it "raises an error if both version and sql_defintion are provided" do + it "raises an error if both version and sql_definition are provided" do expect do connection.update_view( :views, version: 1, - sql_definition: "a defintion" + sql_definition: "a definition" ) end.to raise_error ArgumentError, /cannot both be set/ end