Sha256: 55e4aa4eb01bf7540bbffc6d4460cff8408d0b9eb3bcc8747e31611290905ab1
Contents?: true
Size: 837 Bytes
Versions: 1
Compression:
Stored size: 837 Bytes
Contents
#!/usr/bin/env fancy require: "fancy_spec" require: "option_parser" test_dir = "tests" OptionParser new: @{ remove_after_parsed: true banner: "FSpec - FancySpec runner\nOptions:" with: "-d [path]" doc: "Set the tests directory" do: |dir| { test_dir = dir } } . parse: ARGV test_files = ARGV rest if: (test_files empty?) then: { test_files = Directory list: "#{test_dir}/**/*.fy" if: (test_files empty?) then: { if: (Directory exists?: test_dir) then: { "No test files found. Add them to the tests/ directory." println } else: { "Test directory '#{test_dir}' not found. Create it!" println } System exit: 1 } } start = Time now test_files sort each: |f| { require: f } Console newline FancySpec SpecTest print_failures: start no_failures: { System exit: 0 } else: { System exit: 1 }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fancy-0.8.0 | bin/fspec |