Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update Changelog

  • Loading branch information...
commit baf4c31f33b9d14e6d841c96799fbe721a34d6e7 1 parent f1e2024
@dchelimsky dchelimsky authored
Showing with 12 additions and 8 deletions.
  1. +12 −8 Changelog.md
View
20 Changelog.md
@@ -3,18 +3,22 @@
Enhancements
-* `config.mock_with` and `config.expect_with` yield custom config object to a
- block if given
- * aids decoupling from rspec-core's configuation
-* Allow specifying multiple `--example` options. (Daniel Doubrovkine @dblock)
-* `subject(:article) { Article.new }`
+* Support multiple `--example` options. (Daniel Doubrovkine @dblock)
+* Named subject e.g. `subject(:article) { Article.new }`
* see [http://blog.davidchelimsky.net/2012/05/13/spec-smell-explicit-use-of-subject/](http://blog.davidchelimsky.net/2012/05/13/spec-smell-explicit-use-of-subject/)
for background.
* thanks to Bradley Schaefer for suggesting it and Avdi Grimm for almost
suggesting it.
-* Limit monkey patching of `describe` onto just the objects
- that need it rather than every object in the system (Myron Marston).
-* new JSON formatter (Alex Chaffee)
+* `config.mock_with` and `config.expect_with` yield custom config object to a
+ block if given
+ * aids decoupling from rspec-core's configuation
+* `include_context` and `include_examples` support a block, which gets eval'd
+ in the current context (vs the nested context generated by `it_behaves_like`).
+* Add `config.order = 'random'` to the `spec_helper.rb` generated by `rspec
+ --init`.
+* Delay the loading of DRb (Myron Marston).
+* Limit monkey patching of `describe` onto just the objects that need it rather
+ than every object in the system (Myron Marston).
Bug fixes

3 comments on commit baf4c31

@thefonso

Has 'context' replaced 'describe' in nested describe blocks? Was recently doing some simple test under rspec 2.10, then upgraded to 2.11. the nested describe block I had, stopped working. Only worked when I changed the nested 'describe' block to a 'context' block.

So this...

https://github.com/thefonso/kata_website/blob/bb19c1d50c273269c8171c3cdbde40d01b25fe9b/spec/requests/simple_website_spec.rb

became this...

https://github.com/thefonso/kata_website/blob/c42dc6d54e02998d079ff5dbeb0727465c03b3d4/spec/requests/simple_website_spec.rb

@dchelimsky
Owner

context is an alias for describe everywhere but the top level, so you can only use describe at the top level but you can use either at any nested level.

@myronmarston

@thefonso -- the problem in the original example you had is that you were using describe inside an it block:

https://github.com/thefonso/kata_website/blob/bb19c1d50c273269c8171c3cdbde40d01b25fe9b/spec/requests/simple_website_spec.rb#L4-5

That may have worked previously (due to the fact that describe was available on every object) but it was definitely not supported. Your fix is fine, but if you prefer describe to context you can change it back now that you're not nesting them inside an it block.

Please sign in to comment.
Something went wrong with that request. Please try again.