Class: RSpec::FileMatchers::GenerateMigration
- Inherits:
-
Object
- Object
- RSpec::FileMatchers::GenerateMigration
- Defined in:
- lib/rspec_for_generators/matchers/file/generate_migration.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(relative) ⇒ GenerateMigration
constructor
A new instance of GenerateMigration.
- #matches?(generator) ⇒ Boolean
- #negative_failure_message ⇒ Object
Constructor Details
#initialize(relative) ⇒ GenerateMigration
Returns a new instance of GenerateMigration.
12 13 14 |
# File 'lib/rspec_for_generators/matchers/file/generate_migration.rb', line 12 def initialize(relative) @relative = relative end |
Instance Method Details
#failure_message ⇒ Object
20 21 22 |
# File 'lib/rspec_for_generators/matchers/file/generate_migration.rb', line 20 def "Expected migration #{relative} to have been generated, but it was not" end |
#matches?(generator) ⇒ Boolean
16 17 18 |
# File 'lib/rspec_for_generators/matchers/file/generate_migration.rb', line 16 def matches?(generator) migration_file_name(relative, generator) end |
#negative_failure_message ⇒ Object
24 25 26 |
# File 'lib/rspec_for_generators/matchers/file/generate_migration.rb', line 24 def "Did not expect migration #{relative} to have been generated, but it was" end |