Sha256: 2a377c95b551f2db05eb13581de2aacad380af2aeeeb363d2e02b881fa5a7e8a

Contents?: true

Size: 425 Bytes

Versions: 7

Compression:

Stored size: 425 Bytes

Contents

require 'spec_helper'

describe Microscope::InstanceMethod::BooleanInstanceMethod do
  before do
    run_migration do
      create_table(:animals, force: true) do |t|
        t.boolean :fed, default: false
      end
    end

    microscope 'Animal'
  end

  describe '#feed!' do
    let(:animal) { Animal.create(fed: false) }
    it { expect { animal.feed! }.to change { animal.reload.fed? }.from(false).to(true) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
microscope-0.5.6.1 spec/microscope/instance_method/boolean_instance_method_spec.rb
microscope-0.5.6 spec/microscope/instance_method/boolean_instance_method_spec.rb
microscope-0.5.5 spec/microscope/instance_method/boolean_instance_method_spec.rb
microscope-0.5.4 spec/microscope/instance_method/boolean_instance_method_spec.rb
microscope-0.5.3 spec/microscope/instance_method/boolean_instance_method_spec.rb
microscope-0.5.2 spec/microscope/instance_method/boolean_instance_method_spec.rb
microscope-0.5.1 spec/microscope/instance_method/boolean_instance_method_spec.rb