ts_schema_spec 0.6.2 → 0.6.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d8e48873074ac373b562a69c895679dc7afbe1a21d81df9910f8e9f766c2fcc
4
- data.tar.gz: bdc53ec65a7c01ff8c63d9ce95525cf01587d25bbf0726b7566a129724401fff
3
+ metadata.gz: aa0e8f7875f653a96d983cef0b248b9a1aeeb94afc948ebf1ef1ac3bf75154f3
4
+ data.tar.gz: 4b0a49cea4dc148e4a28228f9fb877331cf04543e8f906e8ceffd04ba798f8e4
5
5
  SHA512:
6
- metadata.gz: 482f0478728009f5bc10ac65f2a9046c5c1d28393d394bddfbd3c59ad4f029a26d9b9eb9587006d4b065756c3b6e6fc59eea95fc60e4f136b8454760cc7eb0e7
7
- data.tar.gz: 6a65b04776bd6c9eb5c12a6bf96b97cbd939d6e7215171e71e71c10f8fbee8f9c4925bb59444110714d262a05e4c0793d73c62da394b48798271bb689d56012c
6
+ metadata.gz: aeb87cc7d2e5fffc8a0b3c31519fe0b40f0d22f2a44216c32f9129252bff2e25d8327fc1064c61609ac25da881af50d35a2eb56e8fd9b2f14e204a675d7251f0
7
+ data.tar.gz: 6b5a662b7e8cba8b5a00cf85c4a7f8f33f76738d255a01c46633221e6d46452cf9f4e743b071be8bd8cc046677ef5957f5f407ee71b4ba96f182a55a38b20d4f
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TsSchemaSpec
4
- VERSION = "0.6.2"
4
+ VERSION = "0.6.3"
5
5
  end
@@ -79,6 +79,8 @@ times on an empty array and asserts nothing.
79
79
  describe "the props handed to MyComponent" do
80
80
  render_views
81
81
 
82
+ my_component = "app/javascript/MyComponent.tsx"
83
+
82
84
  it "matches MyComponentProps" do
83
85
  record = create(:factory_name, trait_a: true)
84
86
  create(:factory_name, :some_trait)
@@ -87,13 +89,14 @@ describe "the props handed to MyComponent" do
87
89
 
88
90
  expect(response).to be_successful
89
91
  props = react_component_props("MyComponent")
90
- expect(props).to match_ts_schema("app/javascript/MyComponent.tsx", "MyComponentProps")
92
+ expect(props).to match_ts_schema(my_component, "MyComponentProps")
91
93
  end
92
94
  end
93
95
  ```
94
96
 
95
- Name the file and type at the assertion. When several examples read the same
96
- source, bind the path to a constant or a let variable.
97
+ Name the file and type at the assertion. Bind the path to a local variable or a
98
+ `let`, not a constant: a constant assigned inside a `describe` block is global
99
+ and collides between spec files.
97
100
 
98
101
  Rules:
99
102
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ts_schema_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vernon Coffey