Skip to content

Commit

Permalink
Fix array_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Nov 22, 2024
1 parent 703adcd commit f2f6bdd
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions openc3/spec/core_ext/array_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,16 @@
# GNU Affero General Public License for more details.

# Modified by OpenC3, Inc.
# All changes Copyright 2022, OpenC3, Inc.
# All changes Copyright 2024, OpenC3, Inc.
# All Rights Reserved
#
# This file may also be used under the terms of a commercial license
# This file may also be used under the terms of a commercial license
# if purchased from OpenC3, Inc.

require 'spec_helper'
require 'openc3/core_ext/array'

describe Array do
describe "inspect" do
it "limits the number of items to 10" do
expect(Array.new([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).inspect).to eql "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
expect(Array.new([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]).inspect).to match(/#<Array:\d+>/)
end
end

describe "clone_to_f" do
it "clones the array and convert all the values to floats" do
expect(Array.new([1, 2, 3, 4, 5]).clone_to_f).to eql [1.0, 2.0, 3.0, 4.0, 5.0]
Expand Down

0 comments on commit f2f6bdd

Please sign in to comment.