RubyGems Navigation menu

rspec-advanced_subject 0.0.4

advanced_subject attempts to cut out having to explicitly write the subject of your example group when trying to call methods or add arguments to methods. It works by reading the conventional description syntax to determine what the method you are calling is and later you state what you are passing to it. Given you have a file advanced_subject_spec.rb. ```ruby describe Hash do when_initialized_with [:a, :b] do it { should eq({a: :b}) } describe '#fetch' do when_passed :a do it { should eq(:b) } end end end end ``` When you run `rspec -f d advanced_subject_spec.rb` it will output: ``` Hash when initialized with [:a, :b] should eq {:a => :b} #fetch when passed :a should eq :b ```

Versions:

  1. 0.0.4 - December 11, 2014 (6 KB)
  2. 0.0.2.1 - July 28, 2014 (6 KB)
  3. 0.0.1 - July 27, 2014 (4.5 KB)
Show all versions (4 total)

Runtime Dependencies:

Authors:

  • Kelly Stannard, Kelly Stannard, Kelly Stannard, Kelly Stannard, Kelly Stannard, Kelly Stannard, Kelly Stannard, Kelly Stannard, Kelly Stannard, Kelly Stannard, Kelly Stannard

Owners:

D4bfbd908038ea639b25be84dd01df2f

Sha 256 checksum:

6c7181a36d4f7e63ef1479343b342111e545c77006a4d2a636bb197b4bf3a5c8

Total downloads 1,280

For this version 380

Show all versions (4 total)

Required Ruby Version: >= 0

License:

MIT

Gemfile:
= Copy to clipboard Copied!

install:
= Copy to clipboard Copied!

Links: