Skip to content
Latest commit b249014 @mrageh mrageh Clarify one-liner syntax cannot be used with block matchers
Users sometimes try to use the one-liner syntax with block matchers,
which can cause RSpec to behave in strange ways. This behaviour is not
supported in RSpec because the complexity of implementing it would
greatly outweigh the benefits.

This commit just clarifies in the documentation that the one-liner
syntax does not support block matchers.

Possible fix for rspec/rspec-expectations#805
..
Failed to load latest commit information.
command_line Update fail-fast integration tests
configuration Followups from #2065.
example_groups Shared examples feature has wrong description.
expectation_framework_integration Use a relish url that isn’t version-specific.
filtering Add feature covering if/unless always working
formatters Use delegation instead of inheritance for custom formatter cuke.
helper_methods Tweak a few things about the threadsafe let solution from #1858.
hooks Fixed typo in features/hooks/filtering.feature
metadata Correct a misspelled word in a feature
mock_framework_integration `c.mock_framework = :foo` => `c.mock_with :foo`
pending_and_skipped_examples Include failure details in pending example dumps.
spec_files Use code backticks in feature and scenario names.
step_definitions Fix group profile output regressions introduced in #1971.
subject Clarify one-liner syntax cannot be used with block matchers
support Basic recursive bisect formatter
.nav don't warn if ANSICON not installed on Windows. Document ANSICON util…
README.md Remove line breaks.
Upgrade.md A few more minor grammar and formatting updates.
clear_examples.feature PR 1706 followups
core_standalone.feature Skip specs with non-mri-compatible backtrace.

README.md

rspec-core provides the structure for RSpec code examples:

describe Account do
  it "has a balance of zero when first opened" do
    # example code goes here - for more on the
    # code inside the examples, see rspec-expectations
    # and rspec-mocks
  end
end

Issues

This documentation is open source, and a work in progress. If you find it incomplete or confusing, please submit an issue, or, better yet, a pull request.

Something went wrong with that request. Please try again.