forked from mbleigh/acts-as-taggable-on
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added specs for the migration_generator
- Loading branch information
1 parent
dcc0c62
commit fd63eda
Showing
4 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
.rvmrc | ||
Gemfile.lock | ||
spec/database.yml | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
spec/generators/acts_as_taggable_on/migration/migration_generator_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require 'spec_helper' | ||
|
||
# Generators are not automatically loaded by Rails | ||
require 'generators/acts_as_taggable_on/migration/migration_generator' | ||
|
||
describe ActsAsTaggableOn::MigrationGenerator do | ||
# Tell the generator where to put its output (what it thinks of as Rails.root) | ||
destination File.expand_path("../../../../../tmp", __FILE__) | ||
|
||
before do | ||
prepare_destination | ||
Rails::Generators.options[:rails][:orm] = :active_record | ||
end | ||
describe 'no arguments' do | ||
before { run_generator } | ||
|
||
describe 'db/migrate/acts_as_taggable_on_migration.rb' do | ||
subject { file('db/migrate/acts_as_taggable_on_migration.rb') } | ||
it { should be_a_migration } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters