Sha256: 8a391560f5cd5a51afa8d242e62a198aa0840659ea8d7b0b3e46fc4d5c738abb

Contents?: true

Size: 657 Bytes

Versions: 26

Compression:

Stored size: 657 Bytes

Contents

require 'spec_helper'

RSpec.describe ActsAsScrubbable::Scrubbable do

  context "not scrubbable" do
    subject {NonScrubbableModel.new}

    describe "scrubbable?" do
      it 'returns false' do
        expect(subject.class.scrubbable?).to eq false
      end
    end
  end


  context "scrubbable" do
    subject {ScrubbableModel.new}

    describe "scrubbable?" do
      it 'returns false' do
        expect(subject.class.scrubbable?).to eq true
      end
    end


    describe "scrubbable_fields" do
      it 'returns the list of scrubbable fields' do
        expect(subject.scrubbable_fields.keys.first).to eq :first_name
      end
    end

  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
acts_as_scrubbable-2.1.5 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-2.1.3 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-2.1.2 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-2.1.1 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-2.0.0 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-1.4.0 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-1.2.1 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-1.1.1 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-1.1.0 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-1.0.2 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-1.0.1 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-1.0.0 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-0.1.4 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-0.1.3 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-0.1.2 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-0.1.1 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-0.1.0 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-0.0.9 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-0.0.8 spec/lib/acts_as_scrubbable/scrubbable_spec.rb
acts_as_scrubbable-0.0.7 spec/lib/acts_as_scrubbable/scrubbable_spec.rb