Skip to content

Commit

Permalink
Rename running_example to example to keep in sync with the rename in …
Browse files Browse the repository at this point in the history
  • Loading branch information
wincent authored and dchelimsky committed Jun 18, 2010
1 parent 759b953 commit f3de931
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/rspec/rails/adapters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def teardown(*methods)

module TestUnitAssertionAdapter
extend ActiveSupport::Concern
def method_name
@running_example
def method_name
@example
end

include Test::Unit::Assertions
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/rails/example/helper_example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def helper
private

def _controller_path
running_example.example_group.describes.to_s.sub(/Helper/,'').underscore
example.example_group.describes.to_s.sub(/Helper/,'').underscore
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/rails/example/view_example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def response
private

def _default_file_to_render
running_example.example_group.top_level_description
example.example_group.top_level_description
end

def _controller_path
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/rails/example/helper_example_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module ::FoosHelper; end

it "provides a controller_path based on the helper module's name" do
helper_spec = Object.new.extend HelperExampleGroup::InstanceMethods
helper_spec.stub_chain(:running_example, :example_group, :describes).and_return(FoosHelper)
helper_spec.stub_chain(:example, :example_group, :describes).and_return(FoosHelper)
helper_spec.__send__(:_controller_path).should == "foos"
end

Expand Down

0 comments on commit f3de931

Please sign in to comment.