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



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

def be_primary_key
  PrimaryKeyMatcher.new
end

#have_column(column_name) ⇒ Object



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

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

#have_table(table_name) ⇒ Object



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

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

#permit_nullObject



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

def permit_null
  NullableColumnMatcher.new
end