You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use airbone with rails. Airborne expect methods keep failing with undefined method '[]' for nil:NilClass.
My test looks like this
require 'rails_helper'
describe "MyTest", type: :request do
it "returns an error" do
get "/api/users/1"
expect_json('error', {message: 'not found'})
end
end
require 'spec_helper'
require 'support/factory_bot'
require 'rspec/rails'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../config/environment', __dir__)
abort("The Rails environment is running in production mode!") if Rails.env.production?
begin
ActiveRecord::Migration.maintain_test_schema!
rescue ActiveRecord::PendingMigrationError => e
puts e.to_s.strip
exit 1
end
RSpec.configure do |config|
config.use_transactional_fixtures = true
config.infer_spec_type_from_file_location!
config.filter_rails_from_backtrace!
end
spec_helper.rb
require 'support/factory_bot'
require 'simplecov'
SimpleCov.start
RSpec.configure do |config|
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end
config.shared_context_metadata_behavior = :apply_to_host_groups
config.include FactoryBot::Syntax::Methods
end
I checked the gem source, it seems that Airbone get method was not called.
I tried including airborne in my rails_helper.rb and spec_helper.rb, even replaced RSpec with Airborne everywhere, but it didn't work. How do I get it to run?
The text was updated successfully, but these errors were encountered:
I am trying to use airbone with rails. Airborne expect methods keep failing with
undefined method '[]' for nil:NilClass
.My test looks like this
Backtrace:
rails_helper.rb
spec_helper.rb
I checked the gem source, it seems that Airbone
get
method was not called.I tried including
airborne
in my rails_helper.rb and spec_helper.rb, even replacedRSpec
withAirborne
everywhere, but it didn't work. How do I get it to run?The text was updated successfully, but these errors were encountered: