Skip to content

Commit

Permalink
Merge pull request #9 from FundingCircle/use-current-directory-if-non…
Browse files Browse the repository at this point in the history
…e-specified

Use current directory if none specified
  • Loading branch information
bliof committed Apr 8, 2016
2 parents 3b6b5e8 + ad3e0e1 commit 0808e03
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/hellgrid
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ require 'find'

require 'hellgrid'

ARGV.each do |folder|
folders = ARGV.empty? ? [Dir.pwd] : ARGV

folders.each do |folder|
matrix = Hellgrid::Matrix.new

Find.find(folder) do |path|
Expand Down
2 changes: 1 addition & 1 deletion lib/hellgrid/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Hellgrid
VERSION = '0.0.1'
VERSION = '0.1.0'
end
18 changes: 18 additions & 0 deletions spec/hellgrid_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,22 @@
expect(`cd ~ && #{PROJECT_ROOT}/bin/hellgrid #{PROJECT_ROOT}/spec/tmp`).to eq(expected_result)
end
end

it 'uses the current working directory by default' do
expected_result = <<-TABLE
x | bar | in/foo
--------------------+--------+--------
diff-lcs | 1.2.5 | 1.2.5
rake | 10.0.0 | 11.1.0
rspec | 2.0.0 | 3.0.0
rspec-core | 2.0.0 | 3.0.4
rspec-expectations | 2.0.0 | 3.0.4
rspec-mocks | 2.0.0 | 3.0.4
rspec-support | x | 3.0.4
TABLE

Bundler.with_clean_env do
expect(`cd #{PROJECT_ROOT}/spec/tmp && #{PROJECT_ROOT}/bin/hellgrid`).to eq(expected_result)
end
end
end

0 comments on commit 0808e03

Please sign in to comment.