Sha256: 29c665e8e8bacbf839a8d316c3da46d6ea40b6c2758164a68e918ea0c24b5daf

Contents?: true

Size: 1.45 KB

Versions: 4

Compression:

Stored size: 1.45 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 "1 + 3"')).to eq('Missing "1 + 3"')
  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

4 entries across 4 versions & 1 rubygems

Version Path
zapata-1.0.0 spec/support/rails_test_app/spec/models/test_send_spec.rb
zapata-0.1.6 spec/support/rails_test_app/spec/models/test_send_spec.rb
zapata-0.1.5 spec/support/rails_test_app/spec/models/test_send_spec.rb
zapata-0.1.4 spec/support/rails_test_app/spec/models/test_send_spec.rb