I'm so sorry to ask this

24 views
Skip to first unread message

Phil Goodwin

unread,
Apr 9, 2020, 3:56:38 AM4/9/20
to rspec
Is there any on-line documentation for Rspec? I assume not because I can't find it by Google search. Even the Rspec site has a page that talks about the documentation without actually linking to it. I just want to know whether "scenario" is a synonym for "context". It seems like this is the simplest thing. I'm going to feel so dumb when I find out where the documentation is, but I honestly can't find it.

Thanks,

Phil

Jon Rowe

unread,
Apr 9, 2020, 4:00:13 AM4/9/20
to rs...@googlegroups.com
Hi Phil

There most certainly is, in addition to the standard `https://rdoc.info` docs which all published gems have (e.g https://rdoc.info/gems/rspec-core for rspec-core) if you go to our site, https://rspec.info/documentation/ you’ll see links to all of our documentation, both our RDoc style API documentation and the Relish hosted “readable” documentation based on our cucumber scenarios.

To answer your question directly, `scenario` is an alias of `it` or `example`. It is used in rspec-rails in conjunction with Capybara for feature tests, see: https://relishapp.com/rspec/rspec-rails/v/4-0/docs/feature-specs/feature-spec

Cheers
Jon Rowe
---------------------------

Jack Royal-Gordon

unread,
Apr 9, 2020, 2:33:50 PM4/9/20
to rs...@googlegroups.com
As a follow-up question, where can I find documentation that talks about the relationship of all these various pieces:
RSpec
Cucumber
Relish
Mini-Test
AutoTest

I seem to be in some kind of dependency hell or version mismatch as I try to get RSpec testing working for my Rails 3.2 / Ruby 2.0 application, preparatory to upgrading Ruby and Rails versions. I think that understanding the relationship of these pieces is the beginning of solving my problems.

--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/dejalu-217-b3ecd662-ec35-4b52-9db4-c2e157310996%40jonrowe.co.uk.

Jon Rowe

unread,
Apr 10, 2020, 5:17:41 AM4/10/20
to rs...@googlegroups.com
There is no such documentation because they are all seperate tools.

RSpec is a standalone testing tool, it consists of a group of gems, by default if you use rspec-rails you’ll automatically use rspec-core rspec-mocks and rspec-expectations which provider the runner, mocking / double tools, and expectation matchers. You can customise the later two parts with other gems but you’re best of looking at their documentation of how to be used with rspec-core if thats the route you are taking.

Cucumber is a BDD descriptive testing framework, we use it to provide documentation via relish and to prevent an entirely dog-food test suit. (E.g it verifies that our documentation works through reproducible examples). Cucumber can use rspec-mocks and rspec-expectations, but this is optional and up to your configuration.

Relish is a cucumber documentation host.

Mini-Test is a replacement for test-unit, whilst you can use rspec-mocks and rspec-expectations with it, this is a-typical. Most people use rspec or mini-test, not both.

AutoTest is an old auto test watcher. It can be safely turned off if you are upgrading an old project, its function is/was to watch your files and run the changed tests to shorten the TDD cycle but has been replaced with more modern tools like guard, zeus, etc.

Cheers
Jon Rowe
---------------------------

Jack Royal-Gordon

unread,
Apr 10, 2020, 3:43:44 PM4/10/20
to rs...@googlegroups.com
Thanks for the excellent summary, Jon.

--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.

Philipp Pirozhkov

unread,
May 4, 2020, 4:45:15 PM5/4/20
to Jack Royal-Gordon
Jack,

Found this message in the spam folder for some reason.

Don't think you'll ever need minitest/autotest if you use RSpec. It's an alternative, rspec-expectations are compatible with it, however, I have never seen minitest+rspec-expectations used together in the wild.

As per relish - it's only used internally by the RSpec core team to build and publish docs, so you will not need it.

For Cucumber, you're free to use the version you like. We were sticking with >= 2.13, < 3.0 for a while, but have recently relaxed this to < 4.0 after making sure we're 3.0-compatible.

What kind of hell is it, can you please be more specific?

Reply all
Reply to author
Forward
0 new messages