Sha256: e281ddb92382377d5662ac7418405ec74050b1b2b01addb1c2ac5a65e6d11282
Contents?: true
Size: 848 Bytes
Versions: 3
Compression:
Stored size: 848 Bytes
Contents
Feature: around hook Scenario: define around(:each) block in example group Given a file named "around_each_in_example_group_spec.rb" with: """ require 'rspec/expectations' class Thing def self.cache @cache ||= [] end def initialize self.class.cache << self end end describe Thing do around(:each) do |example| Thing.new example.run Thing.cache.clear end it "has 1 Thing (1)" do Thing.cache.length.should == 1 end it "has 1 Thing (2)" do Thing.cache.length.should == 1 end end """ When I run "rspec ./around_each_in_example_group_spec.rb" Then the stderr should not contain "NoMethodError" Then I should see "2 examples, 0 failures"
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rspec-core-2.0.0.beta.11 | features/hooks/around_hook.feature |
rspec-core-2.0.0.beta.10 | features/hooks/around_hook.feature |
rspec-core-2.0.0.beta.9 | features/hooks/around_hook.feature |