Sha256: c8a21455e5467f545ea92545ffce926bd51d229d2be3ca719c105abf967f4fc2

Contents?: true

Size: 869 Bytes

Versions: 7

Compression:

Stored size: 869 Bytes

Contents

module InheritedResourceHelpers

  # mock url and other helper methods contributed by inherited resource
  def mock_inherited_resource(resource)
    view.stub(:collection_path).and_return('/collection_path')
    view.stub(:edit_resource_path).and_return('/edit_resource_path')
    view.stub(:new_resource_path).and_return('/new_resource_path')
    view.stub(:parent_path).and_return('/parent_path')
    view.stub(:resource_path).and_return('/resource_path')

    view.stub(:collection_url).and_return('/collection_url')
    view.stub(:edit_resource_url).and_return('/edit_resource_url')
    view.stub(:new_resource_url).and_return('/new_resource_url')
    view.stub(:parent_url).and_return('/parent_url')
    view.stub(:resource_url).and_return('/resource_url')

    view.stub(:collection).and_return([resource])
    view.stub(:resource).and_return(resource)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
refinerycms-multisite-0.0.8 spec/views/inherited_resource_helpers.rb
refinerycms-multisite-0.0.6 spec/views/inherited_resource_helpers.rb
refinerycms-multisite-0.0.5 spec/views/inherited_resource_helpers.rb
refinerycms-multisite-0.0.4 spec/views/inherited_resource_helpers.rb
refinerycms-multisite-0.0.3 spec/views/inherited_resource_helpers.rb
refinerycms-multisite-0.0.2 spec/views/inherited_resource_helpers.rb
refinerycms-multisite-0.0.1 spec/views/inherited_resource_helpers.rb