Skip to content

Instantly share code, notes, and snippets.

@zmoazeni
Created July 7, 2009 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zmoazeni/142050 to your computer and use it in GitHub Desktop.
Save zmoazeni/142050 to your computer and use it in GitHub Desktop.
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/../spec_helpers/controller_behaviors')
describe SomeController do
stub_all_filters!
describe "#foo" do
def do_get
get :foo
end
it "should do something" do
controller.send(:instance_variable_set, "@bar", "here's bar")
do_get
end
end
end
class SomeController < ApplicationController
def foo
p "need to do something with #{@bar}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment