Sha256: eb1384f9dc5ee9e62663b89e871046481e25cfb5541d47ae1a50c8508b8427ad

Contents?: true

Size: 528 Bytes

Versions: 2

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

describe Split::EncapsulatedHelper do
  include Split::EncapsulatedHelper

  before do
    allow_any_instance_of(Split::EncapsulatedHelper::ContextShim).to receive(:ab_user)
        .and_return({})
  end

  def params
    raise NoMethodError, 'This method is not really defined'
  end

  describe "ab_test" do
    it "should not raise an error when params raises an error" do
      expect(lambda { ab_test('link_color', 'blue', 'red') }).not_to raise_error
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
split-1.4.1 spec/encapsulated_helper_spec.rb
split-1.4.0 spec/encapsulated_helper_spec.rb