Skip to content

Commit

Permalink
Fix to before_ivar handling - important for let!
Browse files Browse the repository at this point in the history
  • Loading branch information
nyarly committed Aug 30, 2011
1 parent 4486fc6 commit 5f1ca18
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--format documentation
--out last_run
-I /home/judson/ruby/gems/rspec-steps/spec_help/interpose
-I /home/judson/ruby/gems/rspec-steps/lib
-I /home/judson/ruby/gems/rspec-steps/spec_help
--require spec_helper
--require spec_helper
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rspec-steps (0.0.3)
rspec-steps (0.0.4)
rspec (>= 2.6)

GEM
Expand Down
4 changes: 4 additions & 0 deletions lib/rspec-steps/stepwise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def eval_before_alls(example_group_instance)
example_group_instance.example = whole_list_example
world.run_hook_filtered(:before, :each, self, example_group_instance, whole_list_example)
ancestors.reverse.each { |ancestor| ancestor.run_hook(:before, :each, example_group_instance) }
store_before_all_ivars(example_group_instance)
end

def eval_around_eachs(example)
Expand Down Expand Up @@ -122,6 +123,9 @@ def with_indelible_ivars
result = yield
@ivars_indelible = old_value
result
rescue Object
@ivars_indelible = old_value
raise
end

def instance_variable_set(name, value)
Expand Down
2 changes: 1 addition & 1 deletion rspec-steps.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = "rspec-steps"
spec.version = "0.0.5"
spec.version = "0.0.6"
author_list = {
"Judson Lester" => "judson@lrdesign.com",
"Evan Dorn" => "evan@lrdesign.com"
Expand Down

0 comments on commit 5f1ca18

Please sign in to comment.