README.md in rspec_in_context-0.1.1 vs README.md in rspec_in_context-0.1.2
- old
+ new
@@ -1,7 +1,11 @@
# RspecInContext
+[![Gem Version](https://badge.fury.io/rb/rspec_in_context.svg)](https://badge.fury.io/rb/rspec_in_context)
+[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7ee82740e840412b864574851aa44f16)](https://www.codacy.com/project/denis-pasin/rspec_in_context/dashboard?utm_source=github.com&utm_medium=referral&utm_content=denispasin/rspec_in_context&utm_campaign=Badge_Grade_Dashboard)
+
+
This gem is here to help you write better shared_examples in Rspec.
Ever been bothered by the fact that they don't really behave like methods and that you can't pass it a block ? There you go: `rspec_in_context`
**NOTE**: This is an alpha version. For now context are globally scoped.
@@ -56,11 +60,11 @@
end
```
##### Outside a Rspec block
-Outside of a test you have to use `Rspec.define_context`.
+Outside of a test you have to use `RSpec.define_context`.
### Use the context
Anywhere in your test description, use a `in_context` block to use a predefined in_context. **They don't need to be in the same file.** Example:
@@ -102,9 +106,12 @@
it 'will be executed at execute_tests place' do
expect(pomme).to eq("abcd") # => true
end
end
```
+
+* You can add variable instantiation relative to your test where you exactly want
+It's an alias of `execute_tests` so you can't use both. But it let you describe what the block will do better.
* You can use variable in the in_context definition
```ruby
define_context :context_name do |name|