Skip to content

Commit

Permalink
Improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mjacobus committed Mar 16, 2018
1 parent b36664c commit a4ae625
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,11 @@ module My
@suffix = suffix
end

def accept?(config)
config.file_path.end_with?(@suffix)
end

# return nil if you do not want to deal with it
def test_command(config)
cmd = ["/usr/bin/my_test]
if config.all?
return cmd.join(' ')
if config.file_path.end_with?(@suffix)
return "./bin/test #{config.file_path}"
end
cmd << "--file=#{config.file_path}""
cmd << "--line=#{config.line}" if config.line

cmd.join(' ')
end
end
end
Expand All @@ -101,6 +91,20 @@ Now you can run:
bundle exec run_test some/file_spec.custom
```

## Running the last test

Either run a file that does not get caught by any adapter

```bash
bundle exec run_test some/file_spec.unkown # run last test
```

Or

```bash
bundle exec run_test --last
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Expand Down

0 comments on commit a4ae625

Please sign in to comment.