Sha256: 465c8321a5efd85ed90de0e888bfdf2f383502057f2cd21f9e89329b56356697

Contents?: true

Size: 675 Bytes

Versions: 23

Compression:

Stored size: 675 Bytes

Contents

require 'spec_helper'

describe ActiveRecord::Turntable::Sequencer::Mysql do
  before(:all) do
    reload_turntable!(File.join(File.dirname(__FILE__), "../../../config/turntable.yml"))
  end

  let(:sequencer) { ActiveRecord::Turntable::Sequencer::Mysql.new(klass, options) }
  let(:sequence_name) { "users_id_seq" }
  let(:options) { {} }
  let(:klass) { User }

  describe "#next_sequence_value" do
    subject { sequencer.next_sequence_value(sequence_name) }
    it { is_expected.to be_kind_of(Integer) }
  end

  describe "#current_sequence_value" do
    subject { sequencer.current_sequence_value(sequence_name) }
    it { is_expected.to be_kind_of(Integer) }
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
activerecord-turntable-2.0.1 spec/active_record/turntable/sequencer/mysql_spec.rb
activerecord-turntable-2.0.0 spec/active_record/turntable/sequencer/mysql_spec.rb
activerecord-turntable-2.0.0.rc1 spec/active_record/turntable/sequencer/mysql_spec.rb