Commit Graph

1483 Commits

Author SHA1 Message Date
Michael Miller dd49fe3a67
Support string interpolation for example names 2022-01-10 21:29:05 -07:00
Michael Miller aabec269cb
Raise compilation error for string interpolation in group name 2022-01-10 21:11:28 -07:00
Michael Miller 07aa968d68
Report failed expectation line
In output listing the failures, the comment line now shows the failed expectation line.
Previously this showed the example's source line.
2022-01-03 18:47:56 -07:00
Michael Miller 4d81031274
Fix usage of 'expect' outside test block
Previously gave weird runtime erorr about mismatched groups.
Now correctly produces a compilation error.
2021-12-13 02:42:02 -07:00
Michael Miller d9269e17a8
Better implementation of explicit subject 2021-12-02 01:57:34 -07:00
Michael Miller 315a318d7d
Explicit "provided" block description
Implements https://gitlab.com/arctic-fox/spectator/-/issues/69
2021-12-01 19:11:36 -07:00
Michael Miller 59ce312341
Fix typos and spelling 2021-11-28 15:45:17 -07:00
Michael Miller f1f1659836
Fix adding stubs to class methods on mocked types 2021-10-11 23:03:50 -06:00
Michael Miller 5692a77a1b
Update naming from partial to target 2021-10-11 23:03:12 -06:00
Michael Miller 53f7c94e8a
Add missing negation variants for method stubs 2021-10-11 22:39:16 -06:00
Michael Miller 36354082c7
Pass arguments to original/fallback for stubbed top-level methods
Addresses https://github.com/icy-arctic-fox/spectator/issues/36
2021-09-28 19:02:42 -06:00
Michael Miller a95c5bcab7
Better handling with `be` match against Value types and nil
Releates to https://github.com/icy-arctic-fox/spectator/issues/37
2021-09-28 18:22:41 -06:00
Michael Miller 99ced17516
Handle undefined methods with have_attributes matcher
Instead of producing a compilation error on missing/undefind methods, 
substitute in an "undefined" value.
This shows better output to the user.
2021-09-26 12:50:17 -06:00
Michael Miller 2f1ac1374b
Use RegexMatcher to force used =~ operator 2021-09-22 17:57:56 -06:00
Michael Miller 64b9c13436
Remove Test prefix 2021-09-22 17:53:42 -06:00
Michael Miller 627a288358
Missing doc 2021-09-20 11:01:00 -06:00
Michael Miller a51640105c
Re-add pre- and post-condition hooks
Accidentally removed in hook refactoring.
Addresses https://gitlab.com/arctic-fox/spectator/-/issues/62
2021-09-16 09:01:51 -06:00
Todd Sundsted a3b7f5f4b1 Handle directories with spaces in the path/filename 2021-09-16 09:02:34 -04:00
Michael Miller 632845574f
Stringify tags
Addresses https://gitlab.com/arctic-fox/spectator/-/issues/61
2021-09-11 16:05:20 -06:00
Michael Miller 09dcbdb383
Fix dumb with JUnit and HTML output 2021-08-19 13:55:58 -06:00
Michael Miller 09414e611b
Brighten yellow for pending 2021-08-19 13:45:22 -06:00
Michael Miller e037e42fa7
Fix links to examples not working 2021-08-19 13:14:53 -06:00
Michael Miller f5ec9ccff6
CSS!
The HTML report looks beautiful.
2021-08-19 13:07:15 -06:00
Michael Miller efca1409c6
Fix dumb 2021-08-19 13:00:51 -06:00
Michael Miller 708fd692ae
Add actual label to match data description 2021-08-19 11:46:07 -06:00
Michael Miller babc7ebc3a
Tweaks 2021-08-18 22:15:50 -06:00
Michael Miller 18b42304c9
Use lists and fix some issues 2021-08-18 18:18:18 -06:00
Michael Miller dd0ef01369
Initial code for HTML formatter 2021-08-18 17:50:09 -06:00
Michael Miller f4fc599a1d
Add display_name convenience method 2021-08-18 17:47:20 -06:00
Michael Miller c49522a791
Allow tags on top-level groups 2021-08-18 15:57:22 -06:00
Michael Miller 21d14bd814
Add f-prefix variants of groups and examples
For instance: `fit` for `it "...", :focus`
2021-08-18 13:55:21 -06:00
Michael Miller 2b27ea5a01
Quick implementation of `filter_run_when_matching`
Needed for focus tests.
2021-08-18 13:46:54 -06:00
Michael Miller fd4812207a
Whitespace 2021-08-18 11:27:06 -06:00
Michael Miller 1e82608500
Add methods matching RSpec for configuring include and exclude tags 2021-08-17 23:40:58 -06:00
Michael Miller c209fe7259
Add ascend methods 2021-08-17 22:10:01 -06:00
Michael Miller 8d366bf637
Fully implemented test filtering by tags
Addresses https://gitlab.com/arctic-fox/spectator/-/issues/16
2021-08-17 21:54:01 -06:00
Michael Miller a9a46c76ad
Support tag filtering with value 2021-08-17 21:34:26 -06:00
Michael Miller b79dd4361e
Initial implementation of tag filtering 2021-08-17 20:52:06 -06:00
Michael Miller 38ea2e7f96
Address Ameba issue 2021-08-17 15:02:34 -06:00
Michael Miller 94d5c96e7d
Implement an example filter that supports matching groups
Addresses https://gitlab.com/arctic-fox/spectator/-/issues/25 and 
https://github.com/icy-arctic-fox/spectator/issues/24
2021-08-17 14:09:37 -06:00
Michael Miller 65799fdd3b
Pass along end line 2021-08-17 13:49:58 -06:00
Michael Miller 67b4c0589b
Implement NodeIterator 2021-08-17 12:55:49 -06:00
Michael Miller cf7d67c972
Simplify ExampleIterator and remove unecessary allocations 2021-08-17 12:55:22 -06:00
Michael Miller 837e4cb85d
Implement Indexable(Node) on ExampleGroup 2021-08-17 12:54:36 -06:00
Michael Miller 4e5a52215a
Simplify 2021-08-16 20:27:27 -06:00
Michael Miller 3803d4582c
Use Iterable(Node) instead of ExampleGroup 2021-08-16 20:27:21 -06:00
Michael Miller aa81f1d948
Change ExampleFilter to a NodeFilter
Node filters may operate on example groups as well as examples.
2021-08-08 12:13:59 -06:00
Michael Miller 0f7a9ed9e8
Remove append and prepend variants of hook definition methods
RSpec defines these as applying to a scope (example, context, suite) as 
opposed to example group.
Mimicing this is currently not possible in Spectator and would require a 
substantial restructure of how hooks are handled.
This may be implemented in the future.
2021-08-08 11:50:30 -06:00
Michael Miller 91d21b38e2
Lazily initialize global DSL spec builder
Require config to create a spec builder.
Config should be fully set up before any DSL is encountered.
2021-08-08 11:25:06 -06:00
Michael Miller 605b82c532
Add prepend and append variants of hooks to DSL 2021-08-08 10:51:39 -06:00