Sha256: cae7044432372fe6f832600d5879348a7779669bda00d87be1e963d1cc6debf8

Contents?: true

Size: 672 Bytes

Versions: 14

Compression:

Stored size: 672 Bytes

Contents

require 'rails_helper'

describe PaidUp::Feature do
  it { should have_many(:features_plans).class_name('PaidUp::FeaturesPlan') }
  it { should have_many(:plans).class_name('PaidUp::Plan').through(:features_plans) }
  it { should validate_presence_of(:name) }
  it { should validate_presence_of(:title) }
  it { should validate_presence_of(:setting_type) }

  context '#feature_model' do
    include_context 'plans and features'
    subject { groups_feature.feature_model }
    it { should eq Group }
  end

  context '#feature_model_name' do
    include_context 'plans and features'
    subject { groups_feature.feature_model_name }
    it { should eq 'Group' }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
paid_up-0.2.4 spec/models/paid_up/feature_spec.rb
paid_up-0.2.3 spec/models/paid_up/feature_spec.rb
paid_up-0.2.2 spec/models/paid_up/feature_spec.rb
paid_up-0.2.1 spec/models/paid_up/feature_spec.rb
paid_up-0.2.0 spec/models/paid_up/feature_spec.rb
paid_up-0.1.9 spec/models/paid_up/feature_spec.rb
paid_up-0.1.8 spec/models/paid_up/feature_spec.rb
paid_up-0.1.7 spec/models/paid_up/feature_spec.rb
paid_up-0.1.6 spec/models/paid_up/feature_spec.rb
paid_up-0.1.5 spec/models/paid_up/feature_spec.rb
paid_up-0.1.4 spec/models/paid_up/feature_spec.rb
paid_up-0.1.3 spec/models/paid_up/feature_spec.rb
paid_up-0.1.1 spec/models/paid_up/feature_spec.rb
paid_up-0.1.0 spec/models/paid_up/feature_spec.rb