craby 0.0.7 → 0.1.0
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 +4 -4
- data/lib/craby/matchers/have_content_for.rb +9 -0
- data/lib/craby/matchers/have_resource_labels_for.rb +11 -0
- data/lib/craby/matchers/have_resource_values_for.rb +11 -0
- data/lib/craby/matchers.rb +1 -0
- data/lib/craby/rails_helper.rb +1 -1
- data/lib/craby/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79cf9dbf3c06ea91cfc24c1f8a0e14baf97233668091b61090a32e55bcfe74c8
|
|
4
|
+
data.tar.gz: f41d7e8f3b399d333c5af397f222f1d2583c8051ee68ca70234f35659b00e03e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e0c9de39476efcb410934c52a64b0a2e95c29d184796d190026a7d24fce5382008d5450d4d2a85fb030ff357529ef1108db4a2eb23474e14ef8c03941f270f14
|
|
7
|
+
data.tar.gz: 3a2f8edf9e690f9b102edde308f61d38f26f34cb4160f1026891f8af2ae2306cab47f95f319561c000dff4c2df719091f43058c1d38ab4514c471a4401d92466
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
RSpec::Matchers.define :have_resource_labels_for do |resource, attributes|
|
|
2
|
+
match do |actual|
|
|
3
|
+
attributes.all? do |attribute|
|
|
4
|
+
actual.has_content?(resource.send(attribute).to_s)
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
failure_message do
|
|
9
|
+
"Expected to have #{resource.class} labels #{attributes} in content"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
RSpec::Matchers.define :have_resource_values_for do |resource, attributes|
|
|
2
|
+
match do |actual|
|
|
3
|
+
attributes.all? do |attribute|
|
|
4
|
+
actual.has_content?(resource.send(attribute).to_s)
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
failure_message do
|
|
9
|
+
"Expected to have #{resource.class} values #{attributes} in content"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Dir[File.join(__dir__, "matchers", "*.rb")].each { |file| require file }
|
data/lib/craby/rails_helper.rb
CHANGED
data/lib/craby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: craby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lavenda Software
|
|
@@ -309,6 +309,10 @@ files:
|
|
|
309
309
|
- lib/craby/default.rb
|
|
310
310
|
- lib/craby/factory_bot.rb
|
|
311
311
|
- lib/craby/faker.rb
|
|
312
|
+
- lib/craby/matchers.rb
|
|
313
|
+
- lib/craby/matchers/have_content_for.rb
|
|
314
|
+
- lib/craby/matchers/have_resource_labels_for.rb
|
|
315
|
+
- lib/craby/matchers/have_resource_values_for.rb
|
|
312
316
|
- lib/craby/rails_helper.rb
|
|
313
317
|
- lib/craby/rubocop.rb
|
|
314
318
|
- lib/craby/shoulda_matchers.rb
|
|
@@ -345,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
345
349
|
- !ruby/object:Gem::Version
|
|
346
350
|
version: '0'
|
|
347
351
|
requirements: []
|
|
348
|
-
rubygems_version:
|
|
352
|
+
rubygems_version: 4.0.5
|
|
349
353
|
specification_version: 4
|
|
350
354
|
summary: Craby is just a quick test suite setup for Rails application
|
|
351
355
|
test_files: []
|