Module: Spec::Matchers::Migration

Included in:
Example::MigrationExampleGroup
Defined in:
lib/spec/matchers/migration_matchers.rb

Defined Under Namespace

Classes: HaveColumnMatcher, HaveTableMatcher, NullableColumnMatcher, PrimaryKeyMatcher

Instance Method Summary collapse

Instance Method Details

#be_primary_keyObject



18
19
20
# File 'lib/spec/matchers/migration_matchers.rb', line 18

def be_primary_key
  PrimaryKeyMatcher.new
end

#have_column(column_name) ⇒ Object



10
11
12
# File 'lib/spec/matchers/migration_matchers.rb', line 10

def have_column(column_name)
  HaveColumnMatcher.new(column_name)
end

#have_table(table_name) ⇒ Object



6
7
8
# File 'lib/spec/matchers/migration_matchers.rb', line 6

def have_table(table_name)
  HaveTableMatcher.new(table_name)
end

#permit_nullObject



14
15
16
# File 'lib/spec/matchers/migration_matchers.rb', line 14

def permit_null
  NullableColumnMatcher.new
end