Sha256: cce3f192324c72344be54d8b91133584a6f24b875ed9870f1c35649c6e6addc8

Contents?: true

Size: 651 Bytes

Versions: 2

Compression:

Stored size: 651 Bytes

Contents

require 'spec_helper'

module Ponytail
  describe Migration do
    describe ".all" do
      before do
        proxy = Struct.new(:proxy, :name, :filename, :version)
        ActiveRecord::Migrator.stub(migrations: [proxy.new('CreateUsers', '001_create_users', 1)])
      end
      subject { Migration.all }
      its(:first) { should be_a_kind_of Migration }
    end

    describe "#initialize" do
      subject { Migration.new(name: 'CreateUsers', filename: '001_create_users.rb', version: 1) }
      its(:name) { should eq 'CreateUsers' }
      its(:filename) { should eq '001_create_users.rb' }
      its(:version) { should eq 1 }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ponytail-0.0.2 spec/migration_spec.rb
ponytail-0.0.1 spec/migration_spec.rb