Sha256: e48c1283fd37900efc061f0eea46355cf9c12a96f4815128c59eb1ad593b0371

Contents?: true

Size: 1.31 KB

Versions: 6

Compression:

Stored size: 1.31 KB

Contents

require 'spec_helper'

describe Codependency::Parser do
  let( :dirname  ){ example.example_group.description }
  let( :basename ){ example.description }
  let( :filename ){ "./spec/fixtures/#{dirname}/#{basename}" }
  let( :file     ){ Pathname( filename ) }

  # TODO convert these to approvals?
  context 'solar_system' do
    example 'body.rb' do
      subject.parse( file ).should == [ ]
    end
    example 'earth.rb' do
      subject.parse( file ).should == [
        'solar_system/planet'
      ]
    end
    example 'mars.rb' do
      subject.parse( file ).should == [
        'solar_system/planet'
      ]
    end
    example 'phobos.rb' do
      subject.parse( file ).should == [
        'solar_system/body',
        'solar_system/mars'
      ]
    end
    example 'planet.rb' do
      subject.parse( file ).should == [
        'solar_system/body'
      ]
    end
  end
  context 'breakfast' do
    example 'butter.js' do
      subject.parse( file ).should == [ ]
    end
    example 'egg.js' do
      subject.parse( file ).should == [
        'breakfast/butter'
      ]
    end
    example 'toast.js' do
      subject.parse( file ).should == [
        'breakfast/butter'
      ]
    end
    example 'sandwich.js' do
      subject.parse( file ).should == [
        'breakfast/egg',
        'breakfast/toast'
      ]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
codependency-2.3.2 spec/codependency/parser_spec.rb
codependency-2.3.1 spec/codependency/parser_spec.rb
codependency-2.3.0 spec/codependency/parser_spec.rb
codependency-2.2.0 spec/codependency/parser_spec.rb
codependency-2.1.0 spec/codependency/parser_spec.rb
codependency-2.0.0 spec/codependency/parser_spec.rb