Rubocop: Using single-quotes properly

This commit is contained in:
Andy Meneely
2014-10-29 12:04:33 -04:00
parent 37fd4e7733
commit e115135d51
23 changed files with 2466 additions and 110 deletions
+6 -6
View File
@@ -3,7 +3,7 @@ require 'squib'
describe Squib::Commands::New do
describe "#process" do
describe '#process' do
before(:all) do
@old_stderr = $stderr
$stderr = StringIO.new
@@ -16,27 +16,27 @@ describe Squib::Commands::New do
@cmd = Squib::Commands::New.new
end
it "raises an error if no directory was specified" do
it 'raises an error if no directory was specified' do
expect{@cmd.process([])}.to raise_error(ArgumentError, 'Please specify a path.')
end
it "creates a new template on an fresh directory" do
it 'creates a new template on an fresh directory' do
@cmd.process(['foo'])
expect(File.exists?('foo/deck.rb')).to be true
end
it "creates a new template on an empty directory" do
it 'creates a new template on an empty directory' do
Dir.mkdir('foo')
@cmd.process(['foo'])
expect(File.exists?('foo/deck.rb')).to be true
end
it "does not create a new template on an empty " do
it 'does not create a new template on an empty ' do
Dir.mkdir('foo')
File.new('foo/somefile.txt', 'w+')
@cmd.process(['foo'])
$stderr.rewind
expect($stderr.string.chomp).to end_with " exists and is not empty. Doing nothing and quitting."
expect($stderr.string.chomp).to end_with ' exists and is not empty. Doing nothing and quitting.'
end
after(:all) do