Sha256: 3cdf2202185831169cba73e1928cdff77ba9b24f3b90fc103f450a7f0f0f7c45

Contents?: true

Size: 690 Bytes

Versions: 1

Compression:

Stored size: 690 Bytes

Contents

require 'rails_helper'

describe RobotToTest do
  let(:robot_to_test) do
    RobotToTest.new('Emiliano', planets: ['Mars', Human.home])
  end

  it '#robot_name' do
    expect(robot_to_test.robot_name('Emiliano')).to eq('Robot_Emiliano')
  end

  it '#cv' do
    expect(robot_to_test.cv).to eq(planets: %w(Mars Earth))
  end

  it '#nested_fun_objects' do
    expect(robot_to_test.nested_fun_objects([[:array, :in, :array], { hash: { in_hash: { in: ['array'] } } }])).to eq('It was fun')
  end

  it '#prefix' do
    expect(RobotToTest.prefix).to eq('Robot')
  end
end

describe Human do
  let(:human) do
    Human.new
  end

  it '#home' do
    expect(Human.home).to eq('Earth')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zapata-1.0.0 spec/support/rails_test_app/spec/models/robot_to_test_spec.rb