Sha256: 39c586e266c465c572274cbd434a6f5184af70f687ae4ee1f8dd20ad78aa26fc
Contents?: true
Size: 1.28 KB
Versions: 8
Compression:
Stored size: 1.28 KB
Contents
require 'rails_helper' describe PaidUp::Feature do include_context 'loaded site' it { should validate_presence_of(:slug) } it { should validate_presence_of(:title) } it { should validate_presence_of(:setting_type) } it do should( validate_inclusion_of(:setting_type).in_array( %w(boolean table_rows rolify_rows) ) ) end context '#feature_model' do subject { groups_feature.feature_model } it { should eq Group } end context '#feature_model_name' do subject { groups_feature.feature_model_name } it { should eq 'Group' } end context '.raw' do subject { PaidUp::Feature.raw } it do should( eq( ad_free: ad_free_feature, groups: groups_feature, doodads: doodads_feature, posts: posts_feature ) ) end end context '.all' do subject { PaidUp::Feature.all } it do should eq [ ad_free_feature, groups_feature, doodads_feature, posts_feature ] end end context '.find_all' do subject { PaidUp::Feature.find_all(setting_type: 'rolify_rows') } it { should be_an Array } end context '.find' do subject { PaidUp::Feature.find(slug: 'groups') } it { should be_a PaidUp::Feature } end end
Version data entries
8 entries across 8 versions & 1 rubygems