Sha256: b9c758c41a7bc04c87ac523d63a30daa6bf056a4824bbf73ec2ccba96d98550f

Contents?: true

Size: 1.44 KB

Versions: 1

Compression:

Stored size: 1.44 KB

Contents

require 'rails_helper'

describe TestSend do
  let(:test_send) do
    TestSend.new
  end

  it '#another_method_as_arg' do
    expect(test_send.another_method_as_arg('Help method')).to eq('Help method')
  end

  it '#second_level_method_chain' do
    expect(test_send.second_level_method_chain('Missing "help_method"')).to eq('Missing "help_method"')
  end

  it '#third_level_method_chain' do
    expect(test_send.third_level_method_chain('Missing "second_level_method"')).to eq('Missing "second_level_method"')
  end

  it '#method_with_calculated_value' do
    expect(test_send.method_with_calculated_value('Missing "+"')).to eq('Missing "+"')
  end

  it '#to_another_object' do
    expect(test_send.to_another_object(AnotherObject.my_name)).to eq('Domas')
  end

  it '#to_another_object_with_params' do
    expect(test_send.to_another_object_with_params(AnotherObject.send_with_params(12))).to eq('Id was 12')
  end

  it '#not_explicit_with_params' do
    expect(test_send.not_explicit_with_params('Could you find it?')).to eq('Could you find it?')
  end

  it '#fail_to_understand' do
    expect(test_send.fail_to_understand('Missing "failure"')).to eq('Missing "failure"')
  end
end

describe AnotherObject do
  let(:another_object) do
    AnotherObject.new
  end

  it '#my_name' do
    expect(AnotherObject.my_name).to eq('Domas')
  end

  it '#send_with_params' do
    expect(AnotherObject.send_with_params('Missing "id"')).to eq('Id was Missing "id"')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zapata-0.1.3 spec/support/rails_test_app/spec/models/test_send_spec.rb