Sha256: 7a541f0672d8d3728b832461b34c6b5c231ce6598390cbb61303826e44cb2154

Contents?: true

Size: 1 KB

Versions: 19

Compression:

Stored size: 1 KB

Contents

RSpec.describe "EitilWrapper::Callbacks" do

  let(:callbacks) { User.instance_methods(false) }

  context "for columns of datatype: boolean" do

    it "should create the callback .{column_name}_became_true" do
      expect(callbacks).to include(:confirmed_became_true)
    end

    it "should create the callback .{column_name}_becomes_true" do
      expect(callbacks).to include(:confirmed_becomes_true)
    end

    it "should create the callback .{column_name}_to_true (works for both become and became)" do
      expect(callbacks).to include(:confirmed_to_true)
    end

    it "should create the callback .{column_name}_became_false" do
      expect(callbacks).to include(:confirmed_became_false)
    end

    it "should create the callback .{column_name}_becomes_false" do
      expect(callbacks).to include(:confirmed_becomes_false)
    end

    it "should create the callback .{column_name}_to_false (works for both become and became)" do
      expect(callbacks).to include(:confirmed_to_false)
    end

  end
  
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
eitil-2.0.3 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-2.0.2 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-2.0.1 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-2.0.0 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.4.1 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.4.0 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.12 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.11 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.10 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.9 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.8 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.7 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.6 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.5 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.4 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.3 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.2 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.1 spec/eitil_wrapper/callbacks/helper_methods_spec.rb
eitil-1.3.0 spec/eitil_wrapper/callbacks/helper_methods_spec.rb