diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-03-08 07:43:24 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-03-08 07:43:24 -0800 |
commit | 348d693c6a846994f0f06ce307f23374101b25f6 (patch) | |
tree | 07b49a8b072ca26ffdb060e07aa9cc3c870aa0a2 /activerecord | |
parent | 8f5c7509d6343d740e09364bef34ee984def0760 (diff) | |
parent | c8918c6972d122531a5ae750ae1b22ff7d539f10 (diff) | |
download | rails-348d693c6a846994f0f06ce307f23374101b25f6.tar.gz rails-348d693c6a846994f0f06ce307f23374101b25f6.tar.bz2 rails-348d693c6a846994f0f06ce307f23374101b25f6.zip |
Merge pull request #9613 from arunagw/remove_fixme
Removing FIXME
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/bind_parameter_test.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/activerecord/test/cases/bind_parameter_test.rb b/activerecord/test/cases/bind_parameter_test.rb index 3652255c38..e399345734 100644 --- a/activerecord/test/cases/bind_parameter_test.rb +++ b/activerecord/test/cases/bind_parameter_test.rb @@ -23,6 +23,8 @@ module ActiveRecord @listener = LogListener.new @pk = Topic.columns.find { |c| c.primary } ActiveSupport::Notifications.subscribe('sql.active_record', @listener) + + skip_if_prepared_statement_caching_is_not_supported end def teardown @@ -30,9 +32,6 @@ module ActiveRecord end def test_binds_are_logged - # FIXME: use skip with minitest - return unless @connection.supports_statement_cache? - sub = @connection.substitute_at(@pk, 0) binds = [[@pk, 1]] sql = "select * from topics where id = #{sub}" @@ -44,9 +43,6 @@ module ActiveRecord end def test_find_one_uses_binds - # FIXME: use skip with minitest - return unless @connection.supports_statement_cache? - Topic.find(1) binds = [[@pk, 1]] message = @listener.calls.find { |args| args[4][:binds] == binds } @@ -54,9 +50,6 @@ module ActiveRecord end def test_logs_bind_vars - # FIXME: use skip with minitest - return unless @connection.supports_statement_cache? - pk = Topic.columns.find { |x| x.primary } payload = { @@ -86,5 +79,11 @@ module ActiveRecord logger.sql event assert_match([[pk.name, 10]].inspect, logger.debugs.first) end + + private + + def skip_if_prepared_statement_caching_is_not_supported + return skip('prepared statement caching is not supported') unless @connection.supports_statement_cache? + end end end |