Sha256: f9481518898bb8fdf413a75622dc080ce934849d9c0ccbe78126590b4caec140
Contents?: true
Size: 1.76 KB
Versions: 3
Compression:
Stored size: 1.76 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper') describe AasmDiagram do describe 'file processing' do it 'should select all the files under the models dir' do ad = AasmDiagram.new files = ad.get_files("test/file_fixture/") files.size.must_equal 3 end it 'should exclude a specific file' do options = OptionsStruct.new(:exclude => ['test/file_fixture/app/models/dummy1.rb']) ad = AasmDiagram.new(options) files = ad.get_files("test/file_fixture/") files.size.must_equal 2 end it 'should exclude a glob pattern of files' do options = OptionsStruct.new(:exclude => ['test/file_fixture/app/models/*/*.rb']) ad = AasmDiagram.new(options) files = ad.get_files("test/file_fixture/") files.size.must_equal 2 end it 'should include only specific file' do options = OptionsStruct.new(:specify => ['test/file_fixture/app/models/sub-dir/sub_dummy.rb']) ad = AasmDiagram.new(options) files = ad.get_files("test/file_fixture/") files.size.must_equal 1 end it 'should include only specified files' do options = OptionsStruct.new(:specify => ['test/file_fixture/app/models/{dummy1.rb,sub-dir/sub_dummy.rb}']) ad = AasmDiagram.new(options) files = ad.get_files("test/file_fixture/") files.size.must_equal 2 end it 'should include only specified files and exclude specified files' do options = OptionsStruct.new(:specify => ['test/file_fixture/app/models/{dummy1.rb,sub-dir/sub_dummy.rb}'], :exclude => ['test/file_fixture/app/models/sub-dir/sub_dummy.rb']) ad = AasmDiagram.new(options) files = ad.get_files("test/file_fixture/") files.size.must_equal 1 end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
railroady-1.2.0 | test/lib/railroady/aasm_diagram_spec.rb |
railroady-1.1.2 | test/lib/railroady/aasm_diagram_spec.rb |
railroady-1.1.1 | test/lib/railroady/aasm_diagram_spec.rb |