test/virtual_test.rb in bindata-2.3.3 vs test/virtual_test.rb in bindata-2.3.4
- old
+ new
@@ -20,19 +20,19 @@
obj.num_bytes.must_equal 0
end
it "asserts on #read" do
data = []
- obj = BinData::Virtual.new(:assert => lambda { data << 1; true })
+ obj = BinData::Virtual.new(assert: -> { data << 1; true })
obj.read ""
data.must_equal [1]
end
it "asserts on #assign" do
data = []
- obj = BinData::Virtual.new(:assert => lambda { data << 1; true })
+ obj = BinData::Virtual.new(assert: -> { data << 1; true })
obj.assign("foo")
data.must_equal [1]
end
@@ -40,9 +40,9 @@
obj = BinData::Virtual.new(3)
obj.must_equal 3
end
it "accepts the :value parameter" do
- obj = BinData::Virtual.new(:value => 3)
+ obj = BinData::Virtual.new(value: 3)
obj.must_equal 3
end
end