Skip to content

Commit

Permalink
! spec-only problem where a method was aliased twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Jul 19, 2010
1 parent bb6a9ea commit bff6a6e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 14 deletions.
10 changes: 6 additions & 4 deletions gem/lib/rails2/lib/view_models/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ class << self
#
# TODO extract into module
#
alias old_add_template_helper add_template_helper
def add_template_helper helper_module
include helper_module
old_add_template_helper helper_module
unless instance_methods.include?('old_add_template_helper')
alias old_add_template_helper add_template_helper
def add_template_helper helper_module
include helper_module
old_add_template_helper helper_module
end
end

# Sets the view format and tries to render the given options.
Expand Down
2 changes: 1 addition & 1 deletion gem/spec/rails2/integration/integration_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
this = File.dirname(__FILE__)

require File.join(this, '../spec_helper')
require File.join(this, '/../spec_helper')

require File.join(this, 'models/subclass')
require File.join(this, 'models/sub_subclass')
Expand Down
2 changes: 1 addition & 1 deletion gem/spec/rails2/lib/extensions/active_record_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '../../spec_helper')
require File.join(File.dirname(__FILE__), '/../../spec_helper')

describe ViewModels::Extensions::ActiveRecord do

Expand Down
2 changes: 1 addition & 1 deletion gem/spec/rails2/lib/extensions/model_reader_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '../../spec_helper')
require File.join(File.dirname(__FILE__), '/../../spec_helper')

describe ViewModels::Extensions::ModelReader do

Expand Down
2 changes: 1 addition & 1 deletion gem/spec/rails2/lib/helpers/collection_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '../../spec_helper')
require File.join(File.dirname(__FILE__), '/../../spec_helper')

describe ViewModels::Helpers::Mapping::Collection do
include ViewModels::Helpers::Mapping
Expand Down
2 changes: 1 addition & 1 deletion gem/spec/rails2/lib/helpers/view_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe ViewModels::Helpers::View do

class TestClass; end
class TestClass < ActionView::Base; end

describe "including it" do
it "should include all the view helpers" do
Expand Down
2 changes: 1 addition & 1 deletion gem/spec/rails2/lib/view_models/view_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '../../spec_helper')
require File.join(File.dirname(__FILE__), '/../../spec_helper')

describe ViewModels::View do

Expand Down
4 changes: 0 additions & 4 deletions gem/spec/rails2/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
require 'rubygems'

# require 'bundler'
# Bundler.require :default, :rails2

require 'spec'

require 'action_controller'

require File.join(File.dirname(__FILE__), '/../../lib/rails2/init')
Expand Down

0 comments on commit bff6a6e

Please sign in to comment.