Permalink
Browse files

Clean up syntax, freshen travis build

  • Loading branch information...
mperham committed Jan 6, 2014
1 parent 3ff2362 commit 931bc726c016f1d95cf9abdb032fcec743468148
Showing with 11 additions and 10 deletions.
  1. +3 −2 .travis.yml
  2. +7 −7 test/test_cas_client.rb
  3. +1 −1 test/test_dalli.rb
View
@@ -2,14 +2,15 @@ language: ruby
rvm:
- 1.9.3
- 2.0.0
- - rbx-19mode
+ - 2.1.0
+ - rbx
- jruby
gemfile:
- gemfiles/rails3.gemfile
- gemfiles/rails4.gemfile
matrix:
allow_failures:
- - rvm: rbx-19mode
+ - rvm: rbx
branches:
only:
- master
View
@@ -24,7 +24,7 @@
# Validate call-with-return-value
stored_value, stored_cas = dc.get_cas('gets_key')
assert_equal stored_value, expected
- assert (stored_cas != 0)
+ assert(stored_cas != 0)
end
end
@@ -43,14 +43,14 @@
resp.each_pair do |k, data|
value, cas = [data.first, data.second]
assert_equal expected_hash[k], value
- assert (cas && cas != 0)
+ assert(cas && cas != 0)
end
# Invocation with block
dc.get_multi_cas(%w(a b c d e f)) do |k, data|
value, cas = [data.first, data.second]
assert_equal expected_hash[k], value
- assert (cas && cas != 0)
+ assert(cas && cas != 0)
end
end
end
@@ -85,20 +85,20 @@
value, cas = dc.get_cas('some_key')
assert_equal value, expected
- assert (!cas.nil? && cas != 0)
+ assert(!cas.nil? && cas != 0)
# Set operation, first with wrong then with correct CAS
expected = {'blah' => 'set succeeded'}
- assert (dc.set_cas('some_key', expected, cas+1) == false)
+ assert(dc.set_cas('some_key', expected, cas+1) == false)
assert op_addset_succeeds(cas = dc.set_cas('some_key', expected, cas))
# Replace operation, first with wrong then with correct CAS
expected = {'blah' => 'replace succeeded'}
- assert (dc.replace_cas('some_key', expected, cas+1) == false)
+ assert(dc.replace_cas('some_key', expected, cas+1) == false)
assert op_addset_succeeds(cas = dc.replace_cas('some_key', expected, cas))
# Delete operation, first with wrong then with correct CAS
- assert (dc.delete_cas('some_key', cas+1) == false)
+ assert(dc.delete_cas('some_key', cas+1) == false)
assert dc.delete_cas('some_key', cas)
end
end
View
@@ -245,7 +245,7 @@
# Invocation with block
dc.get_multi(%w(a b c d e f)) do |k, v|
- assert (expected_resp.has_key?(k) && expected_resp[k] == v)
+ assert(expected_resp.has_key?(k) && expected_resp[k] == v)
expected_resp.delete(k)
end
assert expected_resp.empty?

0 comments on commit 931bc72

Please sign in to comment.