Sha256: a3b4e4091bdb18de825a808918e44c64fe879ae59a003ce7f49f68d981cf3b30

Contents?: true

Size: 1013 Bytes

Versions: 19

Compression:

Stored size: 1013 Bytes

Contents

describe ActivityNotification::ActsAsGroup do
  let(:dummy_model_class) { Dummy::DummyBase }

  describe "as public class methods" do
    describe ".acts_as_group" do
      it "have not included Group before calling" do
        expect(dummy_model_class.respond_to?(:available_as_group?)).to be_falsey
      end

      it "includes Group" do
        dummy_model_class.acts_as_group
        expect(dummy_model_class.respond_to?(:available_as_group?)).to be_truthy
        expect(dummy_model_class.available_as_group?).to be_truthy
      end

      context "with no options" do
        it "returns hash of specified options" do
          expect(dummy_model_class.acts_as_group).to eq({})
        end
      end

      #TODO test other options
    end

    describe ".available_group_options" do
      it "returns list of available options in acts_as_group" do
        expect(dummy_model_class.available_group_options)
          .to eq([:printable_notification_group_name, :printable_name])
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
activity_notification-2.0.0 spec/roles/acts_as_group_spec.rb
activity_notification-1.7.1 spec/roles/acts_as_group_spec.rb
activity_notification-1.7.0 spec/roles/acts_as_group_spec.rb
activity_notification-1.6.1 spec/roles/acts_as_group_spec.rb
activity_notification-1.6.0 spec/roles/acts_as_group_spec.rb
activity_notification-1.5.1 spec/roles/acts_as_group_spec.rb
activity_notification-1.5.0 spec/roles/acts_as_group_spec.rb
activity_notification-1.4.4 spec/roles/acts_as_group_spec.rb
activity_notification-1.4.3 spec/roles/acts_as_group_spec.rb
activity_notification-1.4.2 spec/roles/acts_as_group_spec.rb
activity_notification-1.4.1 spec/roles/acts_as_group_spec.rb
activity_notification-1.4.0 spec/roles/acts_as_group_spec.rb
activity_notification-1.3.0 spec/roles/acts_as_group_spec.rb
activity_notification-1.2.1 spec/roles/acts_as_group_spec.rb
activity_notification-1.2.0 spec/roles/acts_as_group_spec.rb
activity_notification-1.1.0 spec/roles/acts_as_group_spec.rb
activity_notification-1.0.2 spec/roles/acts_as_group_spec.rb
activity_notification-1.0.1 spec/roles/acts_as_group_spec.rb
activity_notification-1.0.0 spec/roles/acts_as_group_spec.rb