spec/gram/gem/generator_spec.rb in gram-0.1.0 vs spec/gram/gem/generator_spec.rb in gram-0.2.0
- old
+ new
@@ -36,59 +36,95 @@
file "Rakefile"
file ".gitignore"
file ".rvmrc"
file "Readme.md"
file "my_gem.gemspec" do
- contains "rspec"
+ contains "minitest"
+ contains "mocha"
contains "yard"
contains "bluecloth"
end
directory "lib" do
file "my_gem.rb"
directory "my_gem" do
file "version.rb"
end
end
directory "spec" do
- file "spec_helper.rb"
+ file "spec_helper.rb" do
+ contains "minitest/spec"
+ end
end
end
}
end
+ end
- context 'with --rails' do
- it 'creates a new rails-ready gem' do
- FileUtils.chdir File.expand_path('../../../../tmp', __FILE__)
- Generator.new.generate('my_gem', ['--rails'])
- destination_root.should have_structure {
- directory "my_gem" do
- file "Gemfile"
- file "Rakefile"
- file ".gitignore"
- file ".rvmrc"
- file "Readme.md"
- file "my_gem.gemspec" do
- contains "activerecord"
- contains "sqlite3"
+ context 'with --rails' do
+ it 'creates a new rails-ready gem' do
+ FileUtils.chdir File.expand_path('../../../../tmp', __FILE__)
+ Generator.new.generate('my_gem', ['--rails'])
+ destination_root.should have_structure {
+ directory "my_gem" do
+ file "Gemfile"
+ file "Rakefile"
+ file ".gitignore"
+ file ".rvmrc"
+ file "Readme.md"
+ file "my_gem.gemspec" do
+ contains "activerecord"
+ contains "sqlite3"
- contains "rspec"
- contains "yard"
- contains "bluecloth"
+ contains "minitest"
+ contains "mocha"
+ contains "bluecloth"
+ end
+ directory "lib" do
+ file "my_gem.rb"
+ directory "my_gem" do
+ file "version.rb"
end
- directory "lib" do
- file "my_gem.rb"
- directory "my_gem" do
- file "version.rb"
- end
+ end
+ directory "spec" do
+ file "spec_helper.rb" do
+ contains "minitest/spec"
+ contains "ActiveRecord"
end
- directory "spec" do
- file "spec_helper.rb" do
- contains "ActiveRecord"
- end
+ end
+ end
+ }
+ end
+ end
+
+ context 'with --rspec' do
+ it 'creates a new rspec-ready gem' do
+ FileUtils.chdir File.expand_path('../../../../tmp', __FILE__)
+ Generator.new.generate('my_gem', ['--rspec'])
+ destination_root.should have_structure {
+ directory "my_gem" do
+ file "Gemfile"
+ file "Rakefile"
+ file ".gitignore"
+ file ".rvmrc"
+ file "Readme.md"
+ file "my_gem.gemspec" do
+ contains "rspec"
+ contains "yard"
+ contains "bluecloth"
+ end
+ directory "lib" do
+ file "my_gem.rb"
+ directory "my_gem" do
+ file "version.rb"
end
end
- }
- end
+ directory "spec" do
+ file "spec_helper.rb" do
+ contains "rspec"
+ end
+ end
+ end
+ }
end
end
end
end