Testing RSpec Scenario Configuration and States in Capybara
This test suite validates RSpec scenario functionality in Capybara, focusing on feature-level testing scenarios with focused and pending states. It demonstrates core RSpec-Capybara integration patterns and configuration handling for different test execution modes.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
teamcapybara/capybara
spec/rspec/scenarios_spec.rb
# frozen_string_literal: true
# rubocop:disable RSpec/MultipleDescribes
require 'spec_helper'
require 'capybara/rspec'
RSpec.configuration.before(:each, file_path: './spec/rspec/scenarios_spec.rb') do
@in_filtered_hook = true
end
feature 'if fscenario aliases focused tag then' do
fscenario 'scenario should have focused meta tag' do |example| # rubocop:disable RSpec/Focus
expect(example.metadata[:focus]).to be true
end
end
feature 'if xscenario aliases to pending then' do
xscenario "this test should be 'temporarily disabled with xscenario'" do # rubocop:disable RSpec/PendingWithoutReason
end
end
# rubocop:enable RSpec/MultipleDescribes