Sha256: 0905064fea858333fca5f3d81391b1bd1e1a7032c1a45b4dc6c4bf4df4b5ab82
Contents?: true
Size: 449 Bytes
Versions: 3
Compression:
Stored size: 449 Bytes
Contents
require "spec_helper" describe Array do describe "#extract_options" do it do args = [1, {a: 1}, {b: 2}] nums, o = args.extract_options expect(nums).to eq([1, {a: 1}]) expect(o).to eq({b: 2}) expect(args).to eq([1, {a: 1}, {b: 2}]) end end describe "#extract_options!" do it do args = [1, {a: 1}, {b: 2}] o = args.extract_options! expect(o).to eq({b: 2}) expect(args).to eq([1, {a: 1}]) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tagen-2.0.2 | spec/tagen/core/array/extract_options_spec.rb |
tagen-2.0.1 | spec/tagen/core/array/extract_options_spec.rb |
tagen-2.0.0 | spec/tagen/core/array/extract_options_spec.rb |