fix 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -2
  3. metadata +8 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56afffa92641798956f66d8015ffaa394b229ca6a7a1af4f73aef233089b3d94
4
- data.tar.gz: b6aa5f4f2cd7674d38e08ac78b3f53def1996760274c478676e1619dae5e809a
3
+ metadata.gz: 42da39754448f5b13b627c7d7abc00f28d77e10958b7e6fbf644f07ce126f89f
4
+ data.tar.gz: aa8f84d8ba82c3a922246cb7e79beb313e9fc37f1f84d98581b93a3fc00bc056
5
5
  SHA512:
6
- metadata.gz: e50bb8c771b9bed55871df7d4115e7a0a50c3661ee09e86a82e6cc3def766c867f964e4f949c75d1a8191345918629ace15fad600d9906d6bf829ac9d31b3be5
7
- data.tar.gz: 969531acec4e9f78a0df7641bfde3ca272bccc7cc038b2866e6ce406c9f6b3e339a73889a4ace65dd281d4663610a7559bcca289b1578c757e509e2e254f4ffd
6
+ metadata.gz: 98dffaff9033661fe96e101e62de24449b2be8b447d176cc8a2753f1d263c0c9e0068e14d2318be394160e0abe8a8bb222b773d87d9ea5acf53c7bf7bfc9b52b
7
+ data.tar.gz: 02d4f4d2ce855570133863fcb7bbf57fdf6359ebd57dde5a8f9fd56839602b9ccd7142bb7e0d56d8e7126a67b568bef78bb3d491fd0afb98549053471dc5149e
data/README.md CHANGED
@@ -123,7 +123,7 @@ example.rb:9: Success: expected "Hello, Alice!" to eq "Hello, Alice!"
123
123
 
124
124
  The block of `test` runs on a fresh object for every expectation, where the lets of its context are methods: it sees them, and sees `Kernel` and the methods of the top level as any code does, but not the instance variables of the file. The value of a `with` is the object given, shared by the expectations of its context: `with items: []` gives the same array to each of them, where `let(:items) { [] }` gives a new one to each.
125
125
 
126
- A let is visible from the subject and from the other lets only. Named in an expectation, where it would be read before any subject exists, it raises `NameError` at load, with the remedy: `name is a let, visible in the subject block and in other lets only`. Its name cannot be a method of the object the subject is built on, public or private, nor a word of the language, so that nothing is redefined in silence: `let(:format)`, `let(:p)` or `let(:it)` raise `ArgumentError` at load, naming the owner (`format is already a method of Kernel`). A `with` has the same rule, and declares the lets it names: a name no `let` declared is a new parameter, not a mistake. A context may declare a name once, inherits the lets declared above it in the contexts around it, and may give a new value to one of them.
126
+ A let is visible from the subject and from the other lets only. Named in an expectation, where it would be read before any subject exists, it raises `NameError` at load, with the remedy: `name is a let, visible in the subject block and in other lets only`. Its name cannot be a method of the object the subject is built on, public or private, nor a word of the language, so that nothing is redefined in silence: `let(:format)`, `let(:p)` or `let(:it)` raise `ArgumentError` at load, naming the owner or the word (`format is already a method of Kernel`, `it is a word of the specification language`). A `with` has the same rule, and declares the lets it names: a name no `let` declared is a new parameter, not a mistake. A context may declare a name once, inherits the lets declared above it in the contexts around it, and may give a new value to one of them.
127
127
 
128
128
  ### `it`
129
129
 
@@ -279,10 +279,15 @@ Each context with expectations runs in a child process, forked from the one that
279
279
 
280
280
  Nothing is rescued around a child, and Fix never writes a result that did not come from an expectation. An `Interrupt`, or a signal the child could trap, is raised again in the parent and stops the run. So does `Aw::ChildError`, for a child that died, was killed or left by `exit!`, or that a `break`, a `return` or a `throw` in the subject block left without a result: the results of the other expectations of its context are lost with it. The children a `fix` matcher forks are inside a matcher, so what they raise is an error of that expectation. On a Ruby without `fork`, a context with expectations raises `NotImplementedError`.
281
281
 
282
- Each child starts as a copy of the parent, with its memory, its signal handlers and its open files, and ends with `exit!`, which runs no `at_exit` handler. Hence a `Random` seeded in the file gives every context the same sequence, while Ruby reseeds `Kernel#rand` in each child; what a subject writes to an IO other than the standard output and error is lost unless it flushes; and what SimpleCov measures in a child is lost, unless the result is stored before `exit!`, as the tests of Fix do, or the run uses `fork: false`. A subject that forks ends its child with `exit!`, as test code does: a child that runs on into Fix instead, by an `exit` or by nothing at all, is ended by Fix without a result. A `Timeout` or a signal in the parent ends the child at once, but not the children of that child, those a `fix` matcher forks or a subject's own, which run on until their work ends. A specification that requires itself at run time, through `satisfy` say, forks without end, and at the process limit a fork waits for a free slot rather than failing. The cost of a context is one fork of the testing process, a few milliseconds.
282
+ Each child starts as a copy of the parent, with its memory, its signal handlers and its open files, and ends with `exit!`, which runs no `at_exit` handler. Hence a `Random` seeded in the file gives every context the same sequence, while Ruby reseeds `Kernel#rand` in each child; what a subject writes to an IO other than the standard output and error is lost unless it flushes; and what SimpleCov measures in a child is lost, unless the result is stored before `exit!`, as the tests of Fix do, or the run uses `fork: false`. A subject that forks ends its child with `exit!`, as test code does: a child that runs on into Fix instead, by an `exit` or by nothing at all, is ended by Fix without a result. A `Timeout` or a signal the parent could trap asks the child to leave with `TERM`, and kills it half a second later if it is still there: the children a `fix` matcher forks are reaped with it, unless one ignores `TERM`, but a subject's own children run on until their work ends. A specification that requires itself at run time, through `satisfy` say, forks without end, and at the process limit a fork waits for a free slot rather than failing. The cost of a context is one fork of the testing process, a few milliseconds.
283
283
 
284
284
  `test(fork: false) { … }` and `run(fork: false) { … }` run the contexts in the process itself, for a debugger: an `exit!` of the subject then ends the process, what one context leaves behind reaches the next, and a `fix` matcher still forks.
285
285
 
286
+ ## Changes in 1.0.1
287
+
288
+ - Requires aw 1.0.1: a `Timeout` or a trappable signal in the parent asks the child to leave with `TERM` and kills it half a second later, so that the children a `fix` matcher forks are reaped with it; 1.0.0 accepted aw 1.0.0, which killed the child at once and left them running.
289
+ - Documentation: `let(:it)` names the word of the language it collides with, not an owner.
290
+
286
291
  ## Versioning
287
292
 
288
293
  Fix follows [Semantic Versioning 2.0](https://semver.org/).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
@@ -16,6 +16,9 @@ dependencies:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
18
  version: '1.0'
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 1.0.1
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -23,6 +26,9 @@ dependencies:
23
26
  - - "~>"
24
27
  - !ruby/object:Gem::Version
25
28
  version: '1.0'
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 1.0.1
26
32
  - !ruby/object:Gem::Dependency
27
33
  name: defi
28
34
  requirement: !ruby/object:Gem::Requirement
@@ -89,6 +95,7 @@ licenses:
89
95
  - MIT
90
96
  metadata:
91
97
  bug_tracker_uri: https://github.com/fixrb/fix/issues
98
+ changelog_uri: https://github.com/fixrb/fix#changes-in-101
92
99
  documentation_uri: https://rubydoc.info/gems/fix
93
100
  rubygems_mfa_required: 'true'
94
101
  source_code_uri: https://github.com/fixrb/fix