spec/lib/generators/rieles/install_generator_spec.rb in rieles-0.0.5 vs spec/lib/generators/rieles/install_generator_spec.rb in rieles-0.0.6

- old
+ new

@@ -6,17 +6,17 @@ describe Rieles::InstallGenerator do include GeneratorSpec::TestCase destination File.expand_path("../../tmp", __FILE__) context 'when creating erb views' do - before(:all) do + before(:each) do prepare_destination ::Rieles::InstallGenerator.any_instance.stub(:engine).and_return('erb') run_generator end - it "crea los archivos de inflections, el locale en español, y los templates del scaffold" do + it 'creates inflection files, spanish locale and erb scaffold templates' do assert_file "config/initializers/inflections.rb", File.read('lib/config/initializer/inflections.rb') assert_file "config/locales/es.yml", File.read('lib/config/locales/es.yml') assert_file "lib/templates/erb/scaffold/new.html.erb", File.read('lib/templates/erb/scaffold/new.html.erb') assert_file "lib/templates/erb/scaffold/show.html.erb", File.read('lib/templates/erb/scaffold/show.html.erb') assert_file "lib/templates/erb/scaffold/edit.html.erb", File.read('lib/templates/erb/scaffold/edit.html.erb') @@ -25,16 +25,16 @@ assert_file "app/views/application/_error_messages.html.erb", File.read('app/views/application/_error_messages.html.erb') end end context 'when creating haml views' do - before(:all) do + before(:each) do prepare_destination ::Rieles::InstallGenerator.any_instance.stub(:engine).and_return('haml') run_generator end - it "crea los archivos de inflections, el locale en español, y los templates del scaffold" do + it 'creates inflection files, spanish locale and haml scaffold templates' do assert_file "config/initializers/inflections.rb", File.read('lib/config/initializer/inflections.rb') assert_file "config/locales/es.yml", File.read('lib/config/locales/es.yml') assert_file "lib/templates/haml/scaffold/new.html.haml", File.read('lib/templates/haml/scaffold/new.html.haml') assert_file "lib/templates/haml/scaffold/show.html.haml", File.read('lib/templates/haml/scaffold/show.html.haml') assert_file "lib/templates/haml/scaffold/edit.html.haml", File.read('lib/templates/haml/scaffold/edit.html.haml')