aboutsummaryrefslogtreecommitdiff
path: root/test/tc_mauve_database_peculiarities.rb
diff options
context:
space:
mode:
authorAlex Young <alex@bytemark.co.uk>2015-02-23 19:22:33 +0000
committerAlex Young <alex@bytemark.co.uk>2015-02-23 19:22:33 +0000
commit16ba9f08109ddb911e9aba8518a93d3df710a46b (patch)
tree0d7835a257ad5a4c47af47f6a2f7b67fe076f287 /test/tc_mauve_database_peculiarities.rb
parentb212665b4e5ecaf9652ab7d3cfcd20597b3ef436 (diff)
Get tests passing on ruby 1.9.3-p551
Diffstat (limited to 'test/tc_mauve_database_peculiarities.rb')
-rw-r--r--test/tc_mauve_database_peculiarities.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/tc_mauve_database_peculiarities.rb b/test/tc_mauve_database_peculiarities.rb
index fa21553..27604a5 100644
--- a/test/tc_mauve_database_peculiarities.rb
+++ b/test/tc_mauve_database_peculiarities.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
$:.unshift "../lib"
require 'th_mauve'
@@ -44,8 +45,10 @@ EOF
%w(UTF-8 WINDOWS-1252 SHIFT-JIS).each do |enc|
x.each do |lang, str|
- assert_nothing_raised("Failed to use iconv to convert to #{enc}") { str = Iconv.conv(enc+"//IGNORE", "utf8", str) }
-
+ assert_nothing_raised("Failed to use iconv to convert to #{enc}") {
+ str = Iconv.conv(enc+"//IGNORE", "utf8", str)
+ }
+
alert = Alert.new(
:alert_id => "#{lang}:#{enc}",
:source => "test",
@@ -69,7 +72,7 @@ class TcMauveDatabasePostgresPeculiarities < TcMauveDatabasePeculiarities
@temp_db = nil
flunk(msg)
end
- # @pg_conn = PGconn.open(:dbname => @temp_db)
+ # @pg_conn = PGconn.open(:dbname => @temp_db)
@db_url = "postgres:///#{@temp_db}"
end
@@ -121,7 +124,7 @@ EOF
assert_equal(1, notification_buffer.length)
notification_buffer.pop
- 10.times do
+ 10.times do
Timecop.freeze(Time.now + 1.minute)
5.times do
AlertChanged.all.each do |ac|
@@ -140,7 +143,7 @@ end
class TcMauveDatabaseSqlite3Peculiarities < TcMauveDatabasePeculiarities
def setup
super
- # @pg_conn = PGconn.open(:dbname => @temp_db)
+ # @pg_conn = PGconn.open(:dbname => @temp_db)
@db_url = "sqlite3::memory:"
end
@@ -148,8 +151,8 @@ class TcMauveDatabaseSqlite3Peculiarities < TcMauveDatabasePeculiarities
# This just makes sure our mixin has been added to the SqliteAdapter.
#
def test_has_mixin
- assert DataMapper::Adapters::SqliteAdapter.private_instance_methods.include?("with_connection_old")
- assert DataMapper::Adapters::SqliteAdapter.public_instance_methods.include?("synchronize")
+ assert DataMapper::Adapters::SqliteAdapter.private_instance_methods.include?(:with_connection_old)
+ assert DataMapper::Adapters::SqliteAdapter.public_instance_methods.include?(:synchronize)
end
end