spec/teststrap_spec.rb in teststrap-1.2.4 vs spec/teststrap_spec.rb in teststrap-1.2.5

- old
+ new

@@ -1,12 +1,12 @@ require 'spec_helper' describe Teststrap::Teststrap do let(:teststrap) { described_class.new } - describe "generate_tests" do - FILES = [ 'Gemfile', 'Berksfile', 'Strainerfile', 'Thorfile', '.gitignore', 'LICENSE'] + describe 'generate_tests' do + FILES = ['Gemfile', 'Berksfile', 'Strainerfile', 'Thorfile', '.gitignore', 'LICENSE'] TEMPLATES = [ 'README.md', 'metadata.rb', '.kitchen.yml', 'spec/default_spec.rb', @@ -19,37 +19,37 @@ teststrap.stub(:template) teststrap.stub(:current_directory_name) .and_return('test_cookbook') end - it "should generate files" do + it 'should generate files' do FILES.each do |file| teststrap.should_receive(:copy_file).with(file) end teststrap.generate_tests end - it "should generate templates" do + it 'should generate templates' do TEMPLATES.each do |template| teststrap.should_receive(:template).with(template) end teststrap.generate_tests end end - describe "current_directory_name" do - it "return current working directory name" do + describe 'current_directory_name' do + it 'return current working directory name' do Dir.stub('pwd').and_return('test/dir/test_cookbook') expect(teststrap.current_directory_name).to eq 'test_cookbook' end end - describe "source_root" do - it "return generator file path" do + describe 'source_root' do + it 'return generator file path' do expect(described_class.source_root) .to include 'teststrap/generator_files' end end end