Skip to content

Commit

Permalink
Merge pull request #113 from joneslee85/fix-spec
Browse files Browse the repository at this point in the history
Ensure that we `rake spec` runs specs in right folder
  • Loading branch information
jodosha committed Dec 21, 2014
2 parents 85d74e8 + c1a2703 commit 1e5e7ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ require 'rake'
require 'rake/testtask'

Rake::TestTask.new do |t|
t.pattern = 'test/**/*_test.rb'
t.libs << 'test'
t.pattern = 'spec/**/*_spec.rb'
t.libs << 'spec'
end

task default: :test
task spec: :test
5 changes: 3 additions & 2 deletions test/commands/new_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ def container_options
it 'generates it' do
content = @root.join('Rakefile').read
content.must_match %(Rake::TestTask.new)
content.must_match %(t.pattern = 'test/**/*_test.rb')
content.must_match %(t.libs << 'test')
content.must_match %(t.pattern = 'spec/**/*_spec.rb')
content.must_match %(t.libs << 'spec')
content.must_match %(task default: :test)
content.must_match %(task spec: :test)
end
end
end
Expand Down

0 comments on commit 1e5e7ad

Please sign in to comment.