Sha256: 79cbac69bf2c540237e02ac04da3c05f5574fb1fa87379ff4e9a1a75b26434cf

Contents?: true

Size: 791 Bytes

Versions: 3

Compression:

Stored size: 791 Bytes

Contents

require 'spec_helper'
require 'fixtures/user'
require 'fixtures/article'

describe BrowsingHistory::Browser do
  let(:article) { Article.new }

  describe 'respond_to' do
    context 'instance' do
      subject { article }

      it { is_expected.to respond_to(:historizable_id) }
      it { is_expected.to respond_to(:historizable_type) }
      it { is_expected.to respond_to(:historizable_class) }
      it { is_expected.to respond_to(:historizable_instance?) }
    end

    context 'singleton' do
      subject { article.class }

      it { is_expected.to respond_to(:historizable_id) }
      it { is_expected.to respond_to(:historizable_type) }
      it { is_expected.to respond_to(:historizable_class) }
      it { is_expected.to respond_to(:historizable_instance?) }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
browsing_history-0.0.4 spec/browsing_history/historizable_spec.rb
browsing_history-0.0.3 spec/browsing_history/historizable_spec.rb
browsing_history-0.0.2 spec/browsing_history/historizable_spec.rb