Repository navigation
test: restructure specs by public method - #357
Merged
Merged
Conversation
Mirror lib/capybara/cuprite in spec/: Driver, Node, Browser and their Extensions get one file each, grouped under `describe "#method"`, and spec/lib moves to spec/unit. Examples from session_spec.rb move to the class they exercise. The private session_wait_time is covered through evaluate_async_script, and the HTML5 drag offsets no longer come from a loop, so every example runs alone with `rspec file:line`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standardizes the spec suite the same way as rubycdp/ferrum#691 and records the rules in a new
AGENTS.md.lib/capybara/cuprite:spec/driver_spec.rb,spec/node_spec.rb,spec/browser_spec.rb,spec/browser/extensions_spec.rb,spec/node/extensions_spec.rb. Unit specs move fromspec/lib/tospec/unit/, and the Capybara shared suite moves tospec/capybara_spec.rb.spec/features/session_spec.rbis gone: its examples move to the class whose public method they exercise (mostlyNode, the restDriver,Browser::ExtensionsandNode::Extensions).describenames one public method. Contexts are used only for contrasting groups or when they carry sharedlet/hooks/tags; no nested contexts. Example names start with a third-person verb.session_wait_timeis now covered throughevaluate_async_script.rspec file:line.The example count is unchanged (1808).