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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d49b59669a3e70c8abcfb361ed337b11f11d880758fd1d9717403d2a954e26bf
4
- data.tar.gz: 5ff8d6c342100b5a0673d2d6eed09659d243cc7800a2220a44c81d0c15176640
3
+ metadata.gz: 79cf9dbf3c06ea91cfc24c1f8a0e14baf97233668091b61090a32e55bcfe74c8
4
+ data.tar.gz: f41d7e8f3b399d333c5af397f222f1d2583c8051ee68ca70234f35659b00e03e
5
5
  SHA512:
6
- metadata.gz: 2f75afb2a1b936012d9c8434548a843b5cbb3cbbaf42b07669754d7ecd61edf6cbdd77d8b09083a41ba25017025551da68cd1dc80bb88125c07ef27a3f4bfe10
7
- data.tar.gz: 9bab2c392a87cb7e42bc2e452817a19775a1448ee6b673fa9f2a99867b4b4254162f896317a34baea43f2544a20fcfdc4a152b2bd1984ed5c5f387ac82333662
6
+ metadata.gz: e0c9de39476efcb410934c52a64b0a2e95c29d184796d190026a7d24fce5382008d5450d4d2a85fb030ff357529ef1108db4a2eb23474e14ef8c03941f270f14
7
+ data.tar.gz: 3a2f8edf9e690f9b102edde308f61d38f26f34cb4160f1026891f8af2ae2306cab47f95f319561c000dff4c2df719091f43058c1d38ab4514c471a4401d92466
@@ -0,0 +1,9 @@
1
+ RSpec::Matchers.define :have_content_for do |content|
2
+ match do |actual|
3
+ content.all? { actual.has_content?(it) }
4
+ end
5
+
6
+ failure_message do
7
+ "Expected to have #{content} in content"
8
+ end
9
+ end
@@ -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 }
@@ -1,4 +1,4 @@
1
- abort("The Rails environment is running in production mode!") if Rails.env.production?
1
+ abort("The Rails environment is running in production mode!") if Rails.env.production? # rubocop:disable Rails/Exit
2
2
 
3
3
  require "rspec/rails"
4
4
 
data/lib/craby/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Craby
2
- VERSION = "0.0.7"
2
+ VERSION = "0.1.0"
3
3
  end
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.7
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: 3.6.9
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: []