Sha256: 079694678cd6122fac4375cc7faa10fa2b4d9c4f87678241b6f1504656931bf9

Contents?: true

Size: 479 Bytes

Versions: 5

Compression:

Stored size: 479 Bytes

Contents

require 'spec_helper'

class Controller
  include AbPanel::ControllerAdditions

  def session
    @session ||= {}
  end
end

describe AbPanel::ControllerAdditions do
  let(:controller) { Controller.new }

  describe "#distinct_id" do
    let(:cookies) { {} }
    before { controller.stub_chain(:cookies, :signed).and_return(cookies) }
    subject { controller.distinct_id }

    it { should match /^([A-Z]|[0-9])([A-Z]|[0-9])([A-Z]|[0-9])([A-Z]|[0-9])([A-Z]|[0-9])$/ }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ab_panel-0.3.3 spec/ab_panel/controller_additions_spec.rb
ab_panel-0.3.2 spec/ab_panel/controller_additions_spec.rb
ab_panel-0.3.1 spec/ab_panel/controller_additions_spec.rb
ab_panel-0.3.0 spec/ab_panel/controller_additions_spec.rb
ab_panel-0.2.0 spec/ab_panel/controller_additions_spec.rb