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