Closed otavioschwanck closed 1 year ago
Can you try running and paste the result here?:
bundle exec rspec your/test/path_spec.rb --format j
{"version":"3.11.0","examples":[{"id":"./spec/models/wallet_spec.rb[1:1:1:1]","description":"find_by_hex_column","full_description":"Wallet behaves like a eth address model implements new methods find_by_hex_column","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":24,"run_time":0.035533,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:1:2]","description":"hex_column","full_description":"Wallet behaves like a eth address model implements new methods hex_column","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":28,"run_time":0.043289,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:2:1]","description":"converts to int","full_description":"Wallet behaves like a eth address model writer converts to int","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":34,"run_time":0.001825,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:2:2]","description":"dont convert if its nil","full_description":"Wallet behaves like a eth address model writer dont convert if its nil","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":42,"run_time":0.000526,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:3:1]","description":"returns as hex","full_description":"Wallet behaves like a eth address model reader returns as hex","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":50,"run_time":0.000635,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:3:2]","description":"returns nil if its nil","full_description":"Wallet behaves like a eth address model reader returns nil if its nil","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":58,"run_time":0.000531,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:4:1]","description":"finds","full_description":"Wallet behaves like a eth address model find_by finds","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":80,"run_time":0.006746,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:2:1]","description":"is expected to be valid","full_description":"Wallet associations is expected to be valid","status":"passed","file_path":"./spec/models/wallet_spec.rb","line_number":15,"run_time":0.001643,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:2:2]","description":"is expected to belong to user required: true","full_description":"Wallet associations is expected to belong to user required: true","status":"passed","file_path":"./spec/models/wallet_spec.rb","line_number":16,"run_time":0.002349,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:3:1]","description":"is expected to validate that :address cannot be empty/falsy","full_description":"Wallet validations is expected to validate that :address cannot be empty/falsy","status":"passed","file_path":"./spec/models/wallet_spec.rb","line_number":20,"run_time":0.002725,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:3:2]","description":"is expected to validate that :alabel cannot be empty/falsy","full_description":"Wallet validations is expected to validate that :alabel cannot be empty/falsy","status":"failed","file_path":"./spec/models/wallet_spec.rb","line_number":22,"run_time":0.001718,"pending_message":null,"exception":{"class":"Shoulda::Matchers::ActiveModel::AllowValueMatcher::AttributeDoesNotExistError","message":"The matcher attempted to set :alabel on the Wallet to nil, but that\nattribute does not exist.","backtrace":["/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter.rb:214:in `attribute_does_not_exist!'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter.rb:78:in `set!'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:38:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `each'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `detect'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `first_passing'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:536:in `public_send'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:536:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:401:in `does_not_match?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/disallow_value_matcher.rb:32:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validation_matcher.rb:179:in `run_allow_or_disallow_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validation_matcher.rb:103:in `disallows_value_of'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:258:in `disallows_original_or_typecast_value?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:180:in `block in matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:179:in `all?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:179:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:51:in `block in handle_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/expectation_target.rb:65:in `to'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/expectation_target.rb:101:in `to'","/Users/otavio/Projetos/api/spec/models/wallet_spec.rb:22:in `block (3 levels) in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:263:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:263:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:486:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-rails-5.1.2/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in \u003cmodule:MinitestLifecycleAdapter\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:390:in `execute_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:390:in `execute_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:486:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:468:in `with_around_example_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:259:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:646:in `block in run_examples'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:642:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:642:in `run_examples'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:607:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/configuration.rb:2068:in `with_suite_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:116:in `block in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/reporter.rb:74:in `report'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:115:in `run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:89:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:71:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:45:in `invoke'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/exe/rspec:4:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/bin/rspec:25:in `load'","/Users/otavio/.rbenv/versions/3.1.2/bin/rspec:25:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `load'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `kernel_load'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:23:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:483:in `exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in `dispatch'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:48:in `block in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:36:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/bin/bundle:25:in `load'","/Users/otavio/.rbenv/versions/3.1.2/bin/bundle:25:in `\u003cmain\u003e'"]}},{"id":"./spec/models/wallet_spec.rb[1:4:1]","description":"updates the wallet with a new nonce","full_description":"Wallet renew_nonce! updates the wallet with a new nonce","status":"passed","file_path":"./spec/models/wallet_spec.rb","line_number":26,"run_time":0.003542,"pending_message":null}],"summary":{"duration":0.103844,"example_count":12,"failure_count":1,"pending_count":0,"errors_outside_of_examples_count":0},"summary_line":"12 examples, 1 failure"}Coverage report generated for RSpec to /Users/otavio/Projetos/api/coverage. 957 / 1138 LOC (84.09%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
Also if you just run it normally in a terminal does it give you your expected result:
bundle exec rspec your/test/path_spec.rb
Also if you just run it normally in a terminal does it give you your expected result:
bundle exec rspec your/test/path_spec.rb
Yeah.
..........F.
Failures:
1) Wallet validations is expected to validate that :alabel cannot be empty/falsy
Failure/Error: it { expect(subject).to validate_presence_of(:alabel) }
Shoulda::Matchers::ActiveModel::AllowValueMatcher::AttributeDoesNotExistError:
The matcher attempted to set :alabel on the Wallet to nil, but that
attribute does not exist.
# ./spec/models/wallet_spec.rb:22:in `block (3 levels) in <top (required)>'
Finished in 0.14678 seconds (files took 4.08 seconds to load)
12 examples, 1 failure
Failed examples:
rspec ./spec/models/wallet_spec.rb:22 # Wallet validations is expected to validate that :alabel cannot be empty/falsy
Coverage report generated for RSpec to /Users/otavio/Projetos/api/coverage. 957 / 1138 LOC (84.09%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
I assume there's something wrong in parsing the backtrace.
Can you try to print out what is the backtrace in test/rspec.lua
line 95:
print(vim.inspect(decoded.exception))
decoded.exception is nil:
nil nil nil ...m/site/pack/packer/start/ror.nvim/lua/ror/test/rspec.lua:81: line value outside range stack traceback: ^I[C]: in function 'nvim_buf_set_extmark' ^I...m/site/pack/packer/start/ror.nvim/lua/ror/test/rspec.lua:81: in function <...m/site/pack/packer/start/ror.nvim/lua/ror/test/rspec.lua:24>
Decoded:
{
description = "find_by_hex_column",
file_path = "./spec/support/shared_examples/eth_address_field_examples.rb",
full_description = "Wallet behaves like a eth address model implements new methods find_by_hex_column",
id = "./spec/models/wallet_spec.rb[1:1:1:1]",
line_number = 24,
pending_message = vim.NIL,
run_time = 0.030059,
status = "passed"
}
{
description = "hex_column",
file_path = "./spec/support/shared_examples/eth_address_field_examples.rb",
full_description = "Wallet behaves like a eth address model implements new methods hex_column",
id = "./spec/models/wallet_spec.rb[1:1:1:2]",
line_number = 28,
pending_message = vim.NIL,
run_time = 0.049542,
status = "passed"
}
{
description = "converts to int",
file_path = "./spec/support/shared_examples/eth_address_field_examples.rb",
full_description = "Wallet behaves like a eth address model writer converts to int",
id = "./spec/models/wallet_spec.rb[1:1:2:1]",
line_number = 34,
pending_message = vim.NIL,
run_time = 0.001997,
status = "passed"
}
PS: i put before the line 95:, at 95 nothing happens (throw errors before)
Is this your whole test file? If it's the whole file has only 31 lines. However, the result from rspec was more than that, I have a feeling it's a shared examples problem.
Is this your whole test file? If it's the whole file has only 31 lines. However, the result from rspec was more than that, I have a feeling it's a shared examples problem.
its because of the:
it_behaves_like "a eth address model" do
it work like a bunch of testes that is defined in other file.
Here it is:
# frozen_string_literal: true
require "rails_helper"
RSpec.shared_examples "a eth address model" do
let(:model) { described_class }
let(:instance) { described_class.new }
let(:factory) { described_class.to_s.underscore.to_sym }
let(:record) { create(factory) }
let(:eth_address_fields) { [] }
let(:writers_methods) { eth_address_fields.map { |field| "#{field}=".to_sym } }
let(:readers_methods) { eth_address_fields.map { |field| "hex_#{field}".to_sym } }
let(:find_by_methods) { eth_address_fields.map { |field| "find_by_hex_#{field}".to_sym } }
let(:write_instance) do
writers_methods.each do |writer|
instance.send(writer, "0x3fb3351ded0635c0932c8317b2b7dcf4c06cfa87")
end
end
context "implements new methods" do
it "find_by_hex_column" do
expect(model.methods).to include(*find_by_methods)
end
it "hex_column" do
expect(record.methods).to include(*readers_methods)
end
end
context "writer" do
it "converts to int" do
write_instance
eth_address_fields.each do |field|
expect(instance.send(field)).to eq("363662879086841174576551244744835967267887708807")
end
end
it "dont convert if its nil" do
instance.send(writers_methods.first, nil)
expect(instance.send(eth_address_fields.first)).to be_nil
end
end
context "reader" do
it "returns as hex" do
write_instance
readers_methods.each do |reader|
expect(instance.send(reader)).to eq("0x3fb3351ded0635c0932c8317b2b7dcf4c06cfa87")
end
end
it "returns nil if its nil" do
instance.send(writers_methods.first, nil)
expect(instance.send(readers_methods.first)).to be_nil
end
end
context "find_by" do
before do
filled_eth_address_fields = {}
eth_address_fields.each do |field|
eth_address_fields.each { |f| filled_eth_address_fields[f] = EthAddress.generate }
filled_eth_address_fields[field] = "0x1111111111111111111111111111111111111111"
create(
factory,
filled_eth_address_fields
)
end
end
it "finds" do
find_by_methods.each do |find_by_method|
expect(model.send(find_by_method, "0x1111111111111111111111111111111111111111")).to be_present
end
end
end
end
My idea here:
when file_path is different then the current file, handles the shared. But i really don't know how to handle that.
i think the ideal is have a check above the it_behaves_like.
Just pushed something up, you should be able to run the test now without error. However, I am only handling those where the file_path is the same as the test_path.
I am curious though if you purposely fail some test in the shared examples and see how does it looks like with the latest master.
Fixed!
I am curious though if you purposely fail some test in the shared examples and see how does it looks like with the latest master.
Failing some on shared nothing happens on the editor. The result:
{"version":"3.11.0","examples":[{"id":"./spec/models/wallet_spec.rb[1:1:1:1]","description":"find_by_hex_column","full_description":"Wallet behaves like a eth address model implements new methods find_by_hex_column","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":24,"run_time":0.032448,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:1:2]","description":"hex_column","full_description":"Wallet behaves like a eth address model implements new methods hex_column","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":28,"run_time":0.054883,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:2:1]","description":"converts to int","full_description":"Wallet behaves like a eth address model writer converts to int","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":34,"run_time":0.001415,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:2:2]","description":"dont convert if its nil","full_description":"Wallet behaves like a eth address model writer dont convert if its nil","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":42,"run_time":0.000428,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:3:1]","description":"returns as hex","full_description":"Wallet behaves like a eth address model reader returns as hex","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":50,"run_time":0.000504,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:3:2]","description":"returns nil if its nil","full_description":"Wallet behaves like a eth address model reader returns nil if its nil","status":"passed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":58,"run_time":0.000402,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:1:4:1]","description":"finds","full_description":"Wallet behaves like a eth address model find_by finds","status":"failed","file_path":"./spec/support/shared_examples/eth_address_field_examples.rb","line_number":80,"run_time":0.022471,"pending_message":null,"exception":{"class":"RSpec::Expectations::ExpectationNotMetError","message":"expected `nil.present?` to be truthy, got false","backtrace":["/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-support-3.11.1/lib/rspec/support.rb:102:in `block in \u003cmodule:Support\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-support-3.11.1/lib/rspec/support.rb:111:in `notify_failure'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/fail_with.rb:35:in `fail_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:40:in `handle_failure'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:56:in `block in handle_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/expectation_target.rb:65:in `to'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/expectation_target.rb:101:in `to'","/Users/otavio/Projetos/api/spec/support/shared_examples/eth_address_field_examples.rb:82:in `block (4 levels) in \u003ctop (required)\u003e'","/Users/otavio/Projetos/api/spec/support/shared_examples/eth_address_field_examples.rb:81:in `each'","/Users/otavio/Projetos/api/spec/support/shared_examples/eth_address_field_examples.rb:81:in `block (3 levels) in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:263:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:263:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:486:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-rails-5.1.2/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in \u003cmodule:MinitestLifecycleAdapter\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:390:in `execute_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:390:in `execute_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:486:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:468:in `with_around_example_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:259:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:646:in `block in run_examples'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:642:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:642:in `run_examples'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:607:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/configuration.rb:2068:in `with_suite_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:116:in `block in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/reporter.rb:74:in `report'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:115:in `run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:89:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:71:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:45:in `invoke'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/exe/rspec:4:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/bin/rspec:25:in `load'","/Users/otavio/.rbenv/versions/3.1.2/bin/rspec:25:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `load'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `kernel_load'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:23:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:483:in `exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in `dispatch'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:48:in `block in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:36:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/bin/bundle:25:in `load'","/Users/otavio/.rbenv/versions/3.1.2/bin/bundle:25:in `\u003cmain\u003e'"]}},{"id":"./spec/models/wallet_spec.rb[1:2:1]","description":"is expected to be valid","full_description":"Wallet associations is expected to be valid","status":"passed","file_path":"./spec/models/wallet_spec.rb","line_number":15,"run_time":0.001683,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:2:2]","description":"is expected to belong to user required: true","full_description":"Wallet associations is expected to belong to user required: true","status":"passed","file_path":"./spec/models/wallet_spec.rb","line_number":16,"run_time":0.001921,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:3:1]","description":"is expected to validate that :address cannot be empty/falsy","full_description":"Wallet validations is expected to validate that :address cannot be empty/falsy","status":"passed","file_path":"./spec/models/wallet_spec.rb","line_number":20,"run_time":0.002531,"pending_message":null},{"id":"./spec/models/wallet_spec.rb[1:3:2]","description":"is expected to validate that :alabel cannot be empty/falsy","full_description":"Wallet validations is expected to validate that :alabel cannot be empty/falsy","status":"failed","file_path":"./spec/models/wallet_spec.rb","line_number":22,"run_time":0.004011,"pending_message":null,"exception":{"class":"Shoulda::Matchers::ActiveModel::AllowValueMatcher::AttributeDoesNotExistError","message":"The matcher attempted to set :alabel on the Wallet to nil, but that\nattribute does not exist.","backtrace":["/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter.rb:214:in `attribute_does_not_exist!'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter.rb:78:in `set!'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:38:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `each'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `detect'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `first_passing'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:536:in `public_send'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:536:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:401:in `does_not_match?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/disallow_value_matcher.rb:32:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validation_matcher.rb:179:in `run_allow_or_disallow_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validation_matcher.rb:103:in `disallows_value_of'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:258:in `disallows_original_or_typecast_value?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:180:in `block in matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:179:in `all?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:179:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:51:in `block in handle_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/expectation_target.rb:65:in `to'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/expectation_target.rb:101:in `to'","/Users/otavio/Projetos/api/spec/models/wallet_spec.rb:22:in `block (3 levels) in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:263:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:263:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:486:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-rails-5.1.2/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in \u003cmodule:MinitestLifecycleAdapter\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:390:in `execute_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:390:in `execute_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:486:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:468:in `with_around_example_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:259:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:646:in `block in run_examples'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:642:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:642:in `run_examples'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:607:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/configuration.rb:2068:in `with_suite_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:116:in `block in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/reporter.rb:74:in `report'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:115:in `run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:89:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:71:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:45:in `invoke'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/exe/rspec:4:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/bin/rspec:25:in `load'","/Users/otavio/.rbenv/versions/3.1.2/bin/rspec:25:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `load'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `kernel_load'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:23:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:483:in `exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in `dispatch'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:48:in `block in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:36:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/bin/bundle:25:in `load'","/Users/otavio/.rbenv/versions/3.1.2/bin/bundle:25:in `\u003cmain\u003e'"]}},{"id":"./spec/models/wallet_spec.rb[1:4:1]","description":"updates the wallet with a new nonce","full_description":"Wallet renew_nonce! updates the wallet with a new nonce","status":"passed","file_path":"./spec/models/wallet_spec.rb","line_number":26,"run_time":0.012917,"pending_message":null}],"summary":{"duration":0.141972,"example_count":12,"failure_count":2,"pending_count":0,"errors_outside_of_examples_count":0},"summary_line":"12 examples, 2 failures"}Coverage report generated for RSpec to /Users/otavio/Projetos/api/coverage. 957 / 1138 LOC (84.09%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
Nice! That's expected, I will probably add something to README saying that this plugin cannot support rspec shared examples now.
I don't use shared examples myself, but I am open for suggestions or PR if you have any ideas on how to handle this.
Nice! That's expected, I will probably add something to README saying that this plugin cannot support rspec shared examples now.
I don't use shared examples myself, but I am open for suggestions or PR if you have any ideas on how to handle this.
i think for now, you can put the diagnostic on the top of file (line 1), just for the user to see the error. Later we think in something to improve, can be that? Maybe add some prefix like concern X:
Nice! That's expected, I will probably add something to README saying that this plugin cannot support rspec shared examples now.
I don't use shared examples myself, but I am open for suggestions or PR if you have any ideas on how to handle this.
if you want me to do it, let me know
@weizheheng i found another bug on this:
if running test only in this line
it { is_expected.to validate_presence_of(:alabel) }
The error doesn't appears.
JSON:
{"version":"3.11.0","messages":["Run options: include {:locations=\u003e{\"./spec/models/wallet_spec.rb\"=\u003e[21]}}"],"examples":[{"id":"./spec/models/wallet_spec.rb[1:3:2]","description":"is expected to validate that :alabel cannot be empty/falsy","full_description":"Wallet validations is expected to validate that :alabel cannot be empty/falsy","status":"failed","file_path":"./spec/models/wallet_spec.rb","line_number":21,"run_time":0.064659,"pending_message":null,"exception":{"class":"Shoulda::Matchers::ActiveModel::AllowValueMatcher::AttributeDoesNotExistError","message":"The matcher attempted to set :alabel on the Wallet to nil, but that\nattribute does not exist.","backtrace":["/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter.rb:214:in `attribute_does_not_exist!'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setter.rb:78:in `set!'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:38:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `each'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `detect'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher/attribute_setters_and_validators.rb:24:in `first_passing'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:536:in `public_send'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:536:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/allow_value_matcher.rb:401:in `does_not_match?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/disallow_value_matcher.rb:32:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validation_matcher.rb:179:in `run_allow_or_disallow_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validation_matcher.rb:103:in `disallows_value_of'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:258:in `disallows_original_or_typecast_value?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:180:in `block in matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:179:in `all?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/shoulda-matchers-5.2.0/lib/shoulda/matchers/active_model/validate_presence_of_matcher.rb:179:in `matches?'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:51:in `block in handle_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:27:in `with_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/handler.rb:48:in `handle_matcher'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/expectation_target.rb:65:in `to'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-expectations-3.11.1/lib/rspec/expectations/expectation_target.rb:101:in `to'","/Users/otavio/Projetos/api/spec/models/wallet_spec.rb:21:in `block (3 levels) in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:263:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:263:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:511:in `block in with_around_and_singleton_context_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:468:in `block in with_around_example_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:486:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-rails-5.1.2/lib/rspec/rails/adapters.rb:75:in `block (2 levels) in \u003cmodule:MinitestLifecycleAdapter\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:390:in `execute_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:457:in `instance_exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:390:in `execute_with'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:352:in `call'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/hooks.rb:486:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:468:in `with_around_example_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example.rb:259:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:646:in `block in run_examples'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:642:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:642:in `run_examples'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:607:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `block in run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/example_group.rb:608:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `map'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/configuration.rb:2068:in `with_suite_hooks'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:116:in `block in run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/reporter.rb:74:in `report'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:115:in `run_specs'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:89:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:71:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib/rspec/core/runner.rb:45:in `invoke'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/exe/rspec:4:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/bin/rspec:25:in `load'","/Users/otavio/.rbenv/versions/3.1.2/bin/rspec:25:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `load'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `kernel_load'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:23:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:483:in `exec'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in `dispatch'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:48:in `block in \u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'","/Users/otavio/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:36:in `\u003ctop (required)\u003e'","/Users/otavio/.rbenv/versions/3.1.2/bin/bundle:25:in `load'","/Users/otavio/.rbenv/versions/3.1.2/bin/bundle:25:in `\u003cmain\u003e'"]}}],"summary":{"duration":0.065452,"example_count":1,"failure_count":1,"pending_count":0,"errors_outside_of_examples_count":0},"summary_line":"1 example, 1 failure"}```
It is inverse of at beginning of the day, that doesn't showed only when running on the entire file.
In this file:
But just doesn't show nothing.
Error that throws:
if i change the error line to:
it shows a success (even being a error)