Sha256: 47cddb8e87d3e678afb58b0a6193a82b9d5a2b1e73308edd6d185bee05f0d5eb

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

# frozen_string_literal: true

describe Zapata::Revolutionist do
  before(:all) do
    @generated = exec_generation('app/models/test_array.rb')
  end

  it '#test_in_arg' do
    has_block('#test_in_arg', %{
      expect(test_array.test_in_arg([2, 7.1, 8])).to eq([2, 7.1, 8])
    })
  end

  it '#test_nested_one_level' do
    has_block('#test_nested_one_level', %{
      expect(test_array.test_nested_one_level([[2, 7.1, 8], :mexico])).to eq([[2, 7.1, 8], :mexico])
    })
  end

  it '#test_nested_two_levels' do
    has_block('#test_nested_two_levels', %{
      expect(test_array.test_nested_two_levels([[[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico])).to eq([[[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico])
    })
  end

  it '#test_nested_three_levels' do
    has_block('#test_nested_three_levels', %{
      expect(test_array.test_nested_three_levels([[[[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico], [[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico])).to eq([[[[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico], [[2, 7.1, 8], :mexico], [2, 7.1, 8], :mexico])
    })
  end

  it '#test_hash_nested' do
    has_block('#test_hash_nested', %{
      expect(test_array.test_hash_nested([{ emiliano: [2, 7.1, 8] }])).to eq([{ emiliano: [2, 7.1, 8] }])
    })
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zapata-1.0.0 spec/array_spec.rb