Module: FassetsCore::TestHelpers

Defined in:
lib/fassets_core/test_helper/every_assets_controller.rb

Instance Method Summary collapse

Instance Method Details

#additional_request_paramsObject



185
186
187
# File 'lib/fassets_core/test_helper/every_assets_controller.rb', line 185

def additional_request_params
  {}
end

#root_pathObject



181
182
183
# File 'lib/fassets_core/test_helper/every_assets_controller.rb', line 181

def root_path
  "/"
end

#setup_contentObject



171
172
173
174
175
176
177
178
179
# File 'lib/fassets_core/test_helper/every_assets_controller.rb', line 171

def setup_content
  my_a = asset
  my_a.stub!(:destroy)
  my_a.stub!(:update_attributes) { true }
  my_a.stub!(:save) { true }
  my_a.stub!(:asset) { double(Asset, :update_attributes => true, :name => "Example Asset") }
  controller.stub!(:find_content) { }
  controller.instance_eval { @content = my_a }
end