Sha256: e5ef1cf2370b3ba83a9a9d3559e96eac82e1f33f71280a4518914e453e31bfc3

Contents?: true

Size: 888 Bytes

Versions: 34

Compression:

Stored size: 888 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../test_helper')

#
# These format tests also broke things in the regular testsuite.
# See ./list_options_test.rb
#
# Therefore, here are some integration tests:
#
describe ::Inch::CLI::Command::List do
  before do
    Dir.chdir fixture_path(:ruby, :simple)
    @command = 'bundle exec inch stats'
  end

  def assert_parsed_output(parsed)
    assert parsed.size > 0
    assert parsed['grade_lists']
    assert parsed['scores']
    assert parsed['priorities']
  end

  it 'should run with --no-private switch' do
    out = `#{@command} --format json`
    refute out.empty?, 'there should be some output'
    assert_parsed_output JSON[out]
  end

  it 'should run with --no-protected switch' do
    out = `#{@command} --format yaml`
    refute out.empty?, 'there should be some output'
    assert_parsed_output YAML.load(out)
  end

end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
inch-0.9.0.rc1 test/integration/stats_options_test.rb
inch-0.8.0 test/integration/stats_options_test.rb
inch-0.8.0.rc2 test/integration/stats_options_test.rb
inch-0.8.0.rc1 test/integration/stats_options_test.rb
inch-0.7.1 test/integration/stats_options_test.rb
inch-0.7.0 test/integration/stats_options_test.rb
inch-0.6.4 test/integration/stats_options_test.rb
inch-0.6.3 test/integration/stats_options_test.rb
inch-0.6.2 test/integration/stats_options_test.rb
inch-0.6.1 test/integration/stats_options_test.rb
inch-0.6.0 test/integration/stats_options_test.rb
inch-0.6.0.rc6 test/integration/stats_options_test.rb
inch-0.6.0.rc5 test/integration/stats_options_test.rb
inch-0.6.0.rc4 test/integration/stats_options_test.rb
inch-0.6.0.rc3 test/integration/stats_options_test.rb
inch-0.6.0.rc2 test/integration/stats_options_test.rb
inch-0.6.0.rc1 test/integration/stats_options_test.rb
inch-0.5.10 test/integration/stats_options_test.rb
inch-0.5.9 test/integration/stats_options_test.rb
inch-0.5.8 test/integration/stats_options_test.rb