From e8fa575a730d6845bc0179f901bef90cb6f6e7fa Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Mon, 5 Aug 2024 11:33:04 -0700 Subject: [PATCH] convert to rspec --- instrumentation/pg/test/fixtures/sql_table_name.json | 2 +- .../opentelemetry/instrumentation/pg/instrumentation_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/pg/test/fixtures/sql_table_name.json b/instrumentation/pg/test/fixtures/sql_table_name.json index c897ddb21..cb8c21b41 100644 --- a/instrumentation/pg/test/fixtures/sql_table_name.json +++ b/instrumentation/pg/test/fixtures/sql_table_name.json @@ -13,7 +13,7 @@ }, { "name": "insert_into", - "sql": "INSERT INTO table_name (column1, column2) VALUES (value1, value2)" + "sql": "INSERT INTO test_table (column1, column2) VALUES (value1, value2)" }, { "name": "update", diff --git a/instrumentation/pg/test/opentelemetry/instrumentation/pg/instrumentation_test.rb b/instrumentation/pg/test/opentelemetry/instrumentation/pg/instrumentation_test.rb index 1c7592a7c..95f470014 100644 --- a/instrumentation/pg/test/opentelemetry/instrumentation/pg/instrumentation_test.rb +++ b/instrumentation/pg/test/opentelemetry/instrumentation/pg/instrumentation_test.rb @@ -384,10 +384,10 @@ def self.load_fixture name = test_case['name'] query = test_case['sql'] - define_method(:"test_sql_table_name_#{name}") do + it "returns the table name for #{name}" do table_name = client.send(:collection_name, query) - assert_equal('test_table', table_name) # TODO: use an expected name from fixtures or update fixtures to always use "table_name" + expect(table_name).must_equal('test_table') end end end