summaryrefslogtreecommitdiff
path: root/lib/rb
diff options
context:
space:
mode:
authorKengo Seki <sekikn@apache.org>2019-10-06 00:13:14 +0900
committerJens Geyer <jensg@apache.org>2019-10-06 12:17:19 +0200
commit5a8cd9d1fbb8517915d80b851b4b3434f4ff5ba5 (patch)
treee5bf7af32291c4dcddfb027647fa664a54cc9ac8 /lib/rb
parentd1ccd0a08fd82a1c58acd308fe533306362a73be (diff)
downloadthrift-5a8cd9d1fbb8517915d80b851b4b3434f4ff5ba5.tar.gz
THRIFT-4971: Fix lib/rb/spec/union_spec.rb so that CI succeeds
Client: Ruby Patch: Kengo Seki This closes #1891
Diffstat (limited to 'lib/rb')
-rw-r--r--lib/rb/spec/union_spec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rb/spec/union_spec.rb b/lib/rb/spec/union_spec.rb
index 0ce630629..efb385346 100644
--- a/lib/rb/spec/union_spec.rb
+++ b/lib/rb/spec/union_spec.rb
@@ -51,8 +51,7 @@ describe 'Union' do
it "should raise for wrong set field when hash initialized and type checking is off" do
Thrift.type_checking = false
union = SpecNamespace::My_union.new({incorrect_field: :incorrect})
- example = lambda { Thrift::Serializer.new.serialize(union) }
- expect(example).to raise_error(RuntimeError, "set_field is not valid for this union!")
+ expect { Thrift::Serializer.new.serialize(union) }.to raise_error(RuntimeError, "set_field is not valid for this union!")
end
it "should not be equal to nil" do